@tstdl/base 0.93.78 → 0.93.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/api/server/gateway.js +1 -1
  2. package/authentication/authentication.api.d.ts +9 -0
  3. package/authentication/authentication.api.js +3 -0
  4. package/authentication/client/authentication.service.d.ts +23 -15
  5. package/authentication/client/authentication.service.js +30 -21
  6. package/authentication/index.d.ts +1 -0
  7. package/authentication/index.js +1 -0
  8. package/authentication/models/authentication-credentials.model.d.ts +2 -2
  9. package/authentication/models/authentication-credentials.model.js +5 -5
  10. package/authentication/models/authentication-session.model.d.ts +2 -2
  11. package/authentication/models/authentication-session.model.js +3 -3
  12. package/authentication/models/subject.model.js +5 -3
  13. package/authentication/models/token-payload-base.model.d.ts +5 -1
  14. package/authentication/models/token-payload-base.model.js +10 -2
  15. package/authentication/models/token.model.d.ts +9 -1
  16. package/authentication/server/authentication-ancillary.service.d.ts +12 -15
  17. package/authentication/server/authentication-ancillary.service.js +3 -0
  18. package/authentication/server/authentication.api-controller.js +5 -5
  19. package/authentication/server/authentication.audit.d.ts +7 -5
  20. package/authentication/server/authentication.service.d.ts +32 -22
  21. package/authentication/server/authentication.service.js +116 -65
  22. package/authentication/server/drizzle/{0001_condemned_pretty_boy.sql → 0000_violet_callisto.sql} +34 -5
  23. package/authentication/server/drizzle/meta/0000_snapshot.json +500 -6
  24. package/authentication/server/drizzle/meta/_journal.json +2 -9
  25. package/authentication/types.d.ts +6 -0
  26. package/authentication/types.js +1 -0
  27. package/document-management/server/drizzle/{0000_ordinary_pretty_boy.sql → 0000_glamorous_lorna_dane.sql} +96 -76
  28. package/document-management/server/drizzle/meta/0000_snapshot.json +360 -142
  29. package/document-management/server/drizzle/meta/_journal.json +2 -16
  30. package/examples/api/authentication.js +3 -2
  31. package/examples/api/custom-authentication.js +11 -9
  32. package/orm/server/drizzle/schema-converter.js +53 -32
  33. package/package.json +1 -1
  34. package/authentication/server/drizzle/0000_calm_warlock.sql +0 -28
  35. package/authentication/server/drizzle/meta/0001_snapshot.json +0 -651
  36. package/document-management/server/drizzle/0001_lyrical_wong.sql +0 -123
  37. package/document-management/server/drizzle/0002_round_warbird.sql +0 -1
  38. package/document-management/server/drizzle/meta/0001_snapshot.json +0 -2728
  39. package/document-management/server/drizzle/meta/0002_snapshot.json +0 -2722
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "bbddb1b8-fa09-4465-8016-5a9b7915023d",
2
+ "id": "ae23001b-1665-42b8-bc2f-469406e8c5a2",
3
3
  "prevId": "00000000-0000-0000-0000-000000000000",
4
4
  "version": "7",
5
5
  "dialect": "postgresql",
@@ -11,7 +11,7 @@
11
11
  "id": {
12
12
  "name": "id",
13
13
  "type": "uuid",
14
- "primaryKey": true,
14
+ "primaryKey": false,
15
15
  "notNull": true,
16
16
  "default": "gen_random_uuid()"
17
17
  },
@@ -94,12 +94,6 @@
94
94
  "primaryKey": false,
95
95
  "notNull": true
96
96
  },
97
- "create_user_id": {
98
- "name": "create_user_id",
99
- "type": "uuid",
100
- "primaryKey": false,
101
- "notNull": false
102
- },
103
97
  "revision": {
104
98
  "name": "revision",
105
99
  "type": "integer",
@@ -134,22 +128,32 @@
134
128
  },
135
129
  "indexes": {},
136
130
  "foreignKeys": {
137
- "document_type_id_type_id_fk": {
138
- "name": "document_type_id_type_id_fk",
131
+ "document_id_type_fkey": {
132
+ "name": "document_id_type_fkey",
139
133
  "tableFrom": "document",
140
134
  "tableTo": "type",
141
135
  "schemaTo": "document_management",
142
136
  "columnsFrom": [
137
+ "tenant_id",
143
138
  "type_id"
144
139
  ],
145
140
  "columnsTo": [
141
+ "tenant_id",
146
142
  "id"
147
143
  ],
148
144
  "onDelete": "no action",
149
145
  "onUpdate": "no action"
150
146
  }
151
147
  },
152
- "compositePrimaryKeys": {},
148
+ "compositePrimaryKeys": {
149
+ "document_tenant_id_id_pk": {
150
+ "name": "document_tenant_id_id_pk",
151
+ "columns": [
152
+ "tenant_id",
153
+ "id"
154
+ ]
155
+ }
156
+ },
153
157
  "uniqueConstraints": {
154
158
  "document_tenant_id_id_unique": {
155
159
  "name": "document_tenant_id_id_unique",
@@ -171,7 +175,7 @@
171
175
  "id": {
172
176
  "name": "id",
173
177
  "type": "uuid",
174
- "primaryKey": true,
178
+ "primaryKey": false,
175
179
  "notNull": true,
176
180
  "default": "gen_random_uuid()"
177
181
  },
@@ -227,36 +231,40 @@
227
231
  },
228
232
  "indexes": {},
229
233
  "foreignKeys": {
230
- "assignment_scope_task_id_assignment_task_id_fk": {
231
- "name": "assignment_scope_task_id_assignment_task_id_fk",
234
+ "assignment_scope_id_assignment_task_fkey": {
235
+ "name": "assignment_scope_id_assignment_task_fkey",
232
236
  "tableFrom": "assignment_scope",
233
237
  "tableTo": "assignment_task",
234
238
  "schemaTo": "document_management",
235
239
  "columnsFrom": [
240
+ "tenant_id",
236
241
  "task_id"
237
242
  ],
238
243
  "columnsTo": [
244
+ "tenant_id",
239
245
  "id"
240
246
  ],
241
247
  "onDelete": "no action",
242
248
  "onUpdate": "no action"
243
249
  },
244
- "assignment_scope_collection_id_collection_id_fk": {
245
- "name": "assignment_scope_collection_id_collection_id_fk",
250
+ "assignment_scope_id_collection_fkey": {
251
+ "name": "assignment_scope_id_collection_fkey",
246
252
  "tableFrom": "assignment_scope",
247
253
  "tableTo": "collection",
248
254
  "schemaTo": "document_management",
249
255
  "columnsFrom": [
256
+ "tenant_id",
250
257
  "collection_id"
251
258
  ],
252
259
  "columnsTo": [
260
+ "tenant_id",
253
261
  "id"
254
262
  ],
255
263
  "onDelete": "no action",
256
264
  "onUpdate": "no action"
257
265
  },
258
- "assignment_scope_tenantId_collectionId_fkey": {
259
- "name": "assignment_scope_tenantId_collectionId_fkey",
266
+ "assignment_scope_tenantId_collectionId_collection_fkey": {
267
+ "name": "assignment_scope_tenantId_collectionId_collection_fkey",
260
268
  "tableFrom": "assignment_scope",
261
269
  "tableTo": "collection",
262
270
  "schemaTo": "document_management",
@@ -271,8 +279,8 @@
271
279
  "onDelete": "no action",
272
280
  "onUpdate": "no action"
273
281
  },
274
- "assignment_scope_tenantId_taskId_fkey": {
275
- "name": "assignment_scope_tenantId_taskId_fkey",
282
+ "assignment_scope_tenantId_taskId_assignment_task_fkey": {
283
+ "name": "assignment_scope_tenantId_taskId_assignment_task_fkey",
276
284
  "tableFrom": "assignment_scope",
277
285
  "tableTo": "assignment_task",
278
286
  "schemaTo": "document_management",
@@ -288,7 +296,15 @@
288
296
  "onUpdate": "no action"
289
297
  }
290
298
  },
291
- "compositePrimaryKeys": {},
299
+ "compositePrimaryKeys": {
300
+ "assignment_scope_tenant_id_id_pk": {
301
+ "name": "assignment_scope_tenant_id_id_pk",
302
+ "columns": [
303
+ "tenant_id",
304
+ "id"
305
+ ]
306
+ }
307
+ },
292
308
  "uniqueConstraints": {
293
309
  "assignment_scope_task_id_collection_id_unique": {
294
310
  "name": "assignment_scope_task_id_collection_id_unique",
@@ -310,7 +326,7 @@
310
326
  "id": {
311
327
  "name": "id",
312
328
  "type": "uuid",
313
- "primaryKey": true,
329
+ "primaryKey": false,
314
330
  "notNull": true,
315
331
  "default": "gen_random_uuid()"
316
332
  },
@@ -367,22 +383,24 @@
367
383
  },
368
384
  "indexes": {},
369
385
  "foreignKeys": {
370
- "assignment_task_document_id_document_id_fk": {
371
- "name": "assignment_task_document_id_document_id_fk",
386
+ "assignment_task_id_document_fkey": {
387
+ "name": "assignment_task_id_document_fkey",
372
388
  "tableFrom": "assignment_task",
373
389
  "tableTo": "document",
374
390
  "schemaTo": "document_management",
375
391
  "columnsFrom": [
392
+ "tenant_id",
376
393
  "document_id"
377
394
  ],
378
395
  "columnsTo": [
396
+ "tenant_id",
379
397
  "id"
380
398
  ],
381
399
  "onDelete": "no action",
382
400
  "onUpdate": "no action"
383
401
  },
384
- "assignment_task_tenantId_documentId_fkey": {
385
- "name": "assignment_task_tenantId_documentId_fkey",
402
+ "assignment_task_tenantId_documentId_document_fkey": {
403
+ "name": "assignment_task_tenantId_documentId_document_fkey",
386
404
  "tableFrom": "assignment_task",
387
405
  "tableTo": "document",
388
406
  "schemaTo": "document_management",
@@ -398,7 +416,15 @@
398
416
  "onUpdate": "no action"
399
417
  }
400
418
  },
401
- "compositePrimaryKeys": {},
419
+ "compositePrimaryKeys": {
420
+ "assignment_task_tenant_id_id_pk": {
421
+ "name": "assignment_task_tenant_id_id_pk",
422
+ "columns": [
423
+ "tenant_id",
424
+ "id"
425
+ ]
426
+ }
427
+ },
402
428
  "uniqueConstraints": {
403
429
  "assignment_task_document_id_unique": {
404
430
  "name": "assignment_task_document_id_unique",
@@ -427,7 +453,7 @@
427
453
  "id": {
428
454
  "name": "id",
429
455
  "type": "uuid",
430
- "primaryKey": true,
456
+ "primaryKey": false,
431
457
  "notNull": true,
432
458
  "default": "gen_random_uuid()"
433
459
  },
@@ -435,7 +461,7 @@
435
461
  "name": "tenant_id",
436
462
  "type": "uuid",
437
463
  "primaryKey": false,
438
- "notNull": false
464
+ "notNull": true
439
465
  },
440
466
  "parent_id": {
441
467
  "name": "parent_id",
@@ -483,22 +509,32 @@
483
509
  },
484
510
  "indexes": {},
485
511
  "foreignKeys": {
486
- "category_parent_id_category_id_fk": {
487
- "name": "category_parent_id_category_id_fk",
512
+ "category_id_category_fkey": {
513
+ "name": "category_id_category_fkey",
488
514
  "tableFrom": "category",
489
515
  "tableTo": "category",
490
516
  "schemaTo": "document_management",
491
517
  "columnsFrom": [
518
+ "tenant_id",
492
519
  "parent_id"
493
520
  ],
494
521
  "columnsTo": [
522
+ "tenant_id",
495
523
  "id"
496
524
  ],
497
525
  "onDelete": "no action",
498
526
  "onUpdate": "no action"
499
527
  }
500
528
  },
501
- "compositePrimaryKeys": {},
529
+ "compositePrimaryKeys": {
530
+ "category_tenant_id_id_pk": {
531
+ "name": "category_tenant_id_id_pk",
532
+ "columns": [
533
+ "tenant_id",
534
+ "id"
535
+ ]
536
+ }
537
+ },
502
538
  "uniqueConstraints": {
503
539
  "category_label_unique": {
504
540
  "name": "category_label_unique",
@@ -528,7 +564,7 @@
528
564
  "id": {
529
565
  "name": "id",
530
566
  "type": "uuid",
531
- "primaryKey": true,
567
+ "primaryKey": false,
532
568
  "notNull": true,
533
569
  "default": "gen_random_uuid()"
534
570
  },
@@ -578,22 +614,32 @@
578
614
  },
579
615
  "indexes": {},
580
616
  "foreignKeys": {
581
- "collection_parent_id_collection_id_fk": {
582
- "name": "collection_parent_id_collection_id_fk",
617
+ "collection_id_collection_fkey": {
618
+ "name": "collection_id_collection_fkey",
583
619
  "tableFrom": "collection",
584
620
  "tableTo": "collection",
585
621
  "schemaTo": "document_management",
586
622
  "columnsFrom": [
623
+ "tenant_id",
587
624
  "parent_id"
588
625
  ],
589
626
  "columnsTo": [
627
+ "tenant_id",
590
628
  "id"
591
629
  ],
592
630
  "onDelete": "no action",
593
631
  "onUpdate": "no action"
594
632
  }
595
633
  },
596
- "compositePrimaryKeys": {},
634
+ "compositePrimaryKeys": {
635
+ "collection_tenant_id_id_pk": {
636
+ "name": "collection_tenant_id_id_pk",
637
+ "columns": [
638
+ "tenant_id",
639
+ "id"
640
+ ]
641
+ }
642
+ },
597
643
  "uniqueConstraints": {
598
644
  "collection_tenant_id_id_unique": {
599
645
  "name": "collection_tenant_id_id_unique",
@@ -615,7 +661,7 @@
615
661
  "id": {
616
662
  "name": "id",
617
663
  "type": "uuid",
618
- "primaryKey": true,
664
+ "primaryKey": false,
619
665
  "notNull": true,
620
666
  "default": "gen_random_uuid()"
621
667
  },
@@ -693,36 +739,40 @@
693
739
  }
694
740
  },
695
741
  "foreignKeys": {
696
- "collection_assignment_collection_id_collection_id_fk": {
697
- "name": "collection_assignment_collection_id_collection_id_fk",
742
+ "collection_assignment_id_collection_fkey": {
743
+ "name": "collection_assignment_id_collection_fkey",
698
744
  "tableFrom": "collection_assignment",
699
745
  "tableTo": "collection",
700
746
  "schemaTo": "document_management",
701
747
  "columnsFrom": [
748
+ "tenant_id",
702
749
  "collection_id"
703
750
  ],
704
751
  "columnsTo": [
752
+ "tenant_id",
705
753
  "id"
706
754
  ],
707
755
  "onDelete": "no action",
708
756
  "onUpdate": "no action"
709
757
  },
710
- "collection_assignment_document_id_document_id_fk": {
711
- "name": "collection_assignment_document_id_document_id_fk",
758
+ "collection_assignment_id_document_fkey": {
759
+ "name": "collection_assignment_id_document_fkey",
712
760
  "tableFrom": "collection_assignment",
713
761
  "tableTo": "document",
714
762
  "schemaTo": "document_management",
715
763
  "columnsFrom": [
764
+ "tenant_id",
716
765
  "document_id"
717
766
  ],
718
767
  "columnsTo": [
768
+ "tenant_id",
719
769
  "id"
720
770
  ],
721
771
  "onDelete": "no action",
722
772
  "onUpdate": "no action"
723
773
  },
724
- "collection_assignment_tenantId_documentId_fkey": {
725
- "name": "collection_assignment_tenantId_documentId_fkey",
774
+ "collection_assignment_tenantId_documentId_document_fkey": {
775
+ "name": "collection_assignment_tenantId_documentId_document_fkey",
726
776
  "tableFrom": "collection_assignment",
727
777
  "tableTo": "document",
728
778
  "schemaTo": "document_management",
@@ -737,8 +787,8 @@
737
787
  "onDelete": "no action",
738
788
  "onUpdate": "no action"
739
789
  },
740
- "collection_assignment_tenantId_collectionId_fkey": {
741
- "name": "collection_assignment_tenantId_collectionId_fkey",
790
+ "collection_assignment_tenantId_collectionId_collection_fkey": {
791
+ "name": "collection_assignment_tenantId_collectionId_collection_fkey",
742
792
  "tableFrom": "collection_assignment",
743
793
  "tableTo": "collection",
744
794
  "schemaTo": "document_management",
@@ -754,7 +804,15 @@
754
804
  "onUpdate": "no action"
755
805
  }
756
806
  },
757
- "compositePrimaryKeys": {},
807
+ "compositePrimaryKeys": {
808
+ "collection_assignment_tenant_id_id_pk": {
809
+ "name": "collection_assignment_tenant_id_id_pk",
810
+ "columns": [
811
+ "tenant_id",
812
+ "id"
813
+ ]
814
+ }
815
+ },
758
816
  "uniqueConstraints": {
759
817
  "ca_tenant_id_collection_id_document_id_unique": {
760
818
  "name": "ca_tenant_id_collection_id_document_id_unique",
@@ -777,7 +835,7 @@
777
835
  "id": {
778
836
  "name": "id",
779
837
  "type": "uuid",
780
- "primaryKey": true,
838
+ "primaryKey": false,
781
839
  "notNull": true,
782
840
  "default": "gen_random_uuid()"
783
841
  },
@@ -785,7 +843,7 @@
785
843
  "name": "tenant_id",
786
844
  "type": "uuid",
787
845
  "primaryKey": false,
788
- "notNull": false
846
+ "notNull": true
789
847
  },
790
848
  "label": {
791
849
  "name": "label",
@@ -834,7 +892,15 @@
834
892
  },
835
893
  "indexes": {},
836
894
  "foreignKeys": {},
837
- "compositePrimaryKeys": {},
895
+ "compositePrimaryKeys": {
896
+ "property_tenant_id_id_pk": {
897
+ "name": "property_tenant_id_id_pk",
898
+ "columns": [
899
+ "tenant_id",
900
+ "id"
901
+ ]
902
+ }
903
+ },
838
904
  "uniqueConstraints": {
839
905
  "property_label_unique": {
840
906
  "name": "property_label_unique",
@@ -863,7 +929,7 @@
863
929
  "id": {
864
930
  "name": "id",
865
931
  "type": "uuid",
866
- "primaryKey": true,
932
+ "primaryKey": false,
867
933
  "notNull": true,
868
934
  "default": "gen_random_uuid()"
869
935
  },
@@ -949,36 +1015,40 @@
949
1015
  },
950
1016
  "indexes": {},
951
1017
  "foreignKeys": {
952
- "property_value_document_id_document_id_fk": {
953
- "name": "property_value_document_id_document_id_fk",
1018
+ "property_value_id_document_fkey": {
1019
+ "name": "property_value_id_document_fkey",
954
1020
  "tableFrom": "property_value",
955
1021
  "tableTo": "document",
956
1022
  "schemaTo": "document_management",
957
1023
  "columnsFrom": [
1024
+ "tenant_id",
958
1025
  "document_id"
959
1026
  ],
960
1027
  "columnsTo": [
1028
+ "tenant_id",
961
1029
  "id"
962
1030
  ],
963
1031
  "onDelete": "no action",
964
1032
  "onUpdate": "no action"
965
1033
  },
966
- "property_value_property_id_property_id_fk": {
967
- "name": "property_value_property_id_property_id_fk",
1034
+ "property_value_id_property_fkey": {
1035
+ "name": "property_value_id_property_fkey",
968
1036
  "tableFrom": "property_value",
969
1037
  "tableTo": "property",
970
1038
  "schemaTo": "document_management",
971
1039
  "columnsFrom": [
1040
+ "tenant_id",
972
1041
  "property_id"
973
1042
  ],
974
1043
  "columnsTo": [
1044
+ "tenant_id",
975
1045
  "id"
976
1046
  ],
977
1047
  "onDelete": "no action",
978
1048
  "onUpdate": "no action"
979
1049
  },
980
- "property_value_tenantId_documentId_fkey": {
981
- "name": "property_value_tenantId_documentId_fkey",
1050
+ "property_value_tenantId_documentId_document_fkey": {
1051
+ "name": "property_value_tenantId_documentId_document_fkey",
982
1052
  "tableFrom": "property_value",
983
1053
  "tableTo": "document",
984
1054
  "schemaTo": "document_management",
@@ -994,7 +1064,15 @@
994
1064
  "onUpdate": "no action"
995
1065
  }
996
1066
  },
997
- "compositePrimaryKeys": {},
1067
+ "compositePrimaryKeys": {
1068
+ "property_value_tenant_id_id_pk": {
1069
+ "name": "property_value_tenant_id_id_pk",
1070
+ "columns": [
1071
+ "tenant_id",
1072
+ "id"
1073
+ ]
1074
+ }
1075
+ },
998
1076
  "uniqueConstraints": {
999
1077
  "property_value_tenant_id_document_id_property_id_unique": {
1000
1078
  "name": "property_value_tenant_id_document_id_property_id_unique",
@@ -1022,7 +1100,7 @@
1022
1100
  "id": {
1023
1101
  "name": "id",
1024
1102
  "type": "uuid",
1025
- "primaryKey": true,
1103
+ "primaryKey": false,
1026
1104
  "notNull": true,
1027
1105
  "default": "gen_random_uuid()"
1028
1106
  },
@@ -1122,36 +1200,40 @@
1122
1200
  }
1123
1201
  },
1124
1202
  "foreignKeys": {
1125
- "request_type_id_type_id_fk": {
1126
- "name": "request_type_id_type_id_fk",
1203
+ "request_id_type_fkey": {
1204
+ "name": "request_id_type_fkey",
1127
1205
  "tableFrom": "request",
1128
1206
  "tableTo": "type",
1129
1207
  "schemaTo": "document_management",
1130
1208
  "columnsFrom": [
1209
+ "tenant_id",
1131
1210
  "type_id"
1132
1211
  ],
1133
1212
  "columnsTo": [
1213
+ "tenant_id",
1134
1214
  "id"
1135
1215
  ],
1136
1216
  "onDelete": "no action",
1137
1217
  "onUpdate": "no action"
1138
1218
  },
1139
- "request_document_id_document_id_fk": {
1140
- "name": "request_document_id_document_id_fk",
1219
+ "request_id_document_fkey": {
1220
+ "name": "request_id_document_fkey",
1141
1221
  "tableFrom": "request",
1142
1222
  "tableTo": "document",
1143
1223
  "schemaTo": "document_management",
1144
1224
  "columnsFrom": [
1225
+ "tenant_id",
1145
1226
  "document_id"
1146
1227
  ],
1147
1228
  "columnsTo": [
1229
+ "tenant_id",
1148
1230
  "id"
1149
1231
  ],
1150
1232
  "onDelete": "no action",
1151
1233
  "onUpdate": "no action"
1152
1234
  },
1153
- "request_tenantId_documentId_fkey": {
1154
- "name": "request_tenantId_documentId_fkey",
1235
+ "request_tenantId_documentId_document_fkey": {
1236
+ "name": "request_tenantId_documentId_document_fkey",
1155
1237
  "tableFrom": "request",
1156
1238
  "tableTo": "document",
1157
1239
  "schemaTo": "document_management",
@@ -1167,7 +1249,15 @@
1167
1249
  "onUpdate": "no action"
1168
1250
  }
1169
1251
  },
1170
- "compositePrimaryKeys": {},
1252
+ "compositePrimaryKeys": {
1253
+ "request_tenant_id_id_pk": {
1254
+ "name": "request_tenant_id_id_pk",
1255
+ "columns": [
1256
+ "tenant_id",
1257
+ "id"
1258
+ ]
1259
+ }
1260
+ },
1171
1261
  "uniqueConstraints": {
1172
1262
  "request_document_id_unique": {
1173
1263
  "name": "request_document_id_unique",
@@ -1196,7 +1286,7 @@
1196
1286
  "id": {
1197
1287
  "name": "id",
1198
1288
  "type": "uuid",
1199
- "primaryKey": true,
1289
+ "primaryKey": false,
1200
1290
  "notNull": true,
1201
1291
  "default": "gen_random_uuid()"
1202
1292
  },
@@ -1268,36 +1358,40 @@
1268
1358
  }
1269
1359
  },
1270
1360
  "foreignKeys": {
1271
- "request_collection_assignment_request_id_request_id_fk": {
1272
- "name": "request_collection_assignment_request_id_request_id_fk",
1361
+ "request_collection_assignment_id_request_fkey": {
1362
+ "name": "request_collection_assignment_id_request_fkey",
1273
1363
  "tableFrom": "request_collection_assignment",
1274
1364
  "tableTo": "request",
1275
1365
  "schemaTo": "document_management",
1276
1366
  "columnsFrom": [
1367
+ "tenant_id",
1277
1368
  "request_id"
1278
1369
  ],
1279
1370
  "columnsTo": [
1371
+ "tenant_id",
1280
1372
  "id"
1281
1373
  ],
1282
1374
  "onDelete": "no action",
1283
1375
  "onUpdate": "no action"
1284
1376
  },
1285
- "request_collection_assignment_collection_id_collection_id_fk": {
1286
- "name": "request_collection_assignment_collection_id_collection_id_fk",
1377
+ "request_collection_assignment_id_collection_fkey": {
1378
+ "name": "request_collection_assignment_id_collection_fkey",
1287
1379
  "tableFrom": "request_collection_assignment",
1288
1380
  "tableTo": "collection",
1289
1381
  "schemaTo": "document_management",
1290
1382
  "columnsFrom": [
1383
+ "tenant_id",
1291
1384
  "collection_id"
1292
1385
  ],
1293
1386
  "columnsTo": [
1387
+ "tenant_id",
1294
1388
  "id"
1295
1389
  ],
1296
1390
  "onDelete": "no action",
1297
1391
  "onUpdate": "no action"
1298
1392
  },
1299
- "request_collection_assignment_tenantId_collectionId_fkey": {
1300
- "name": "request_collection_assignment_tenantId_collectionId_fkey",
1393
+ "rca_tenantId_collectionId_c_fkey": {
1394
+ "name": "rca_tenantId_collectionId_c_fkey",
1301
1395
  "tableFrom": "request_collection_assignment",
1302
1396
  "tableTo": "collection",
1303
1397
  "schemaTo": "document_management",
@@ -1312,8 +1406,8 @@
1312
1406
  "onDelete": "no action",
1313
1407
  "onUpdate": "no action"
1314
1408
  },
1315
- "request_collection_assignment_tenantId_requestId_fkey": {
1316
- "name": "request_collection_assignment_tenantId_requestId_fkey",
1409
+ "request_collection_assignment_tenantId_requestId_request_fkey": {
1410
+ "name": "request_collection_assignment_tenantId_requestId_request_fkey",
1317
1411
  "tableFrom": "request_collection_assignment",
1318
1412
  "tableTo": "request",
1319
1413
  "schemaTo": "document_management",
@@ -1329,7 +1423,15 @@
1329
1423
  "onUpdate": "no action"
1330
1424
  }
1331
1425
  },
1332
- "compositePrimaryKeys": {},
1426
+ "compositePrimaryKeys": {
1427
+ "request_collection_assignment_tenant_id_id_pk": {
1428
+ "name": "request_collection_assignment_tenant_id_id_pk",
1429
+ "columns": [
1430
+ "tenant_id",
1431
+ "id"
1432
+ ]
1433
+ }
1434
+ },
1333
1435
  "uniqueConstraints": {
1334
1436
  "rca_tenant_id_request_id_collection_id_unique": {
1335
1437
  "name": "rca_tenant_id_request_id_collection_id_unique",
@@ -1352,7 +1454,7 @@
1352
1454
  "id": {
1353
1455
  "name": "id",
1354
1456
  "type": "uuid",
1355
- "primaryKey": true,
1457
+ "primaryKey": false,
1356
1458
  "notNull": true,
1357
1459
  "default": "gen_random_uuid()"
1358
1460
  },
@@ -1360,7 +1462,7 @@
1360
1462
  "name": "tenant_id",
1361
1463
  "type": "uuid",
1362
1464
  "primaryKey": false,
1363
- "notNull": false
1465
+ "notNull": true
1364
1466
  },
1365
1467
  "requests_template_id": {
1366
1468
  "name": "requests_template_id",
@@ -1414,36 +1516,48 @@
1414
1516
  },
1415
1517
  "indexes": {},
1416
1518
  "foreignKeys": {
1417
- "request_template_requests_template_id_requests_template_id_fk": {
1418
- "name": "request_template_requests_template_id_requests_template_id_fk",
1519
+ "request_template_id_requests_template_fkey": {
1520
+ "name": "request_template_id_requests_template_fkey",
1419
1521
  "tableFrom": "request_template",
1420
1522
  "tableTo": "requests_template",
1421
1523
  "schemaTo": "document_management",
1422
1524
  "columnsFrom": [
1525
+ "tenant_id",
1423
1526
  "requests_template_id"
1424
1527
  ],
1425
1528
  "columnsTo": [
1529
+ "tenant_id",
1426
1530
  "id"
1427
1531
  ],
1428
1532
  "onDelete": "no action",
1429
1533
  "onUpdate": "no action"
1430
1534
  },
1431
- "request_template_type_id_type_id_fk": {
1432
- "name": "request_template_type_id_type_id_fk",
1535
+ "request_template_id_type_fkey": {
1536
+ "name": "request_template_id_type_fkey",
1433
1537
  "tableFrom": "request_template",
1434
1538
  "tableTo": "type",
1435
1539
  "schemaTo": "document_management",
1436
1540
  "columnsFrom": [
1541
+ "tenant_id",
1437
1542
  "type_id"
1438
1543
  ],
1439
1544
  "columnsTo": [
1545
+ "tenant_id",
1440
1546
  "id"
1441
1547
  ],
1442
1548
  "onDelete": "no action",
1443
1549
  "onUpdate": "no action"
1444
1550
  }
1445
1551
  },
1446
- "compositePrimaryKeys": {},
1552
+ "compositePrimaryKeys": {
1553
+ "request_template_tenant_id_id_pk": {
1554
+ "name": "request_template_tenant_id_id_pk",
1555
+ "columns": [
1556
+ "tenant_id",
1557
+ "id"
1558
+ ]
1559
+ }
1560
+ },
1447
1561
  "uniqueConstraints": {},
1448
1562
  "policies": {},
1449
1563
  "checkConstraints": {},
@@ -1456,7 +1570,7 @@
1456
1570
  "id": {
1457
1571
  "name": "id",
1458
1572
  "type": "uuid",
1459
- "primaryKey": true,
1573
+ "primaryKey": false,
1460
1574
  "notNull": true,
1461
1575
  "default": "gen_random_uuid()"
1462
1576
  },
@@ -1464,7 +1578,7 @@
1464
1578
  "name": "tenant_id",
1465
1579
  "type": "uuid",
1466
1580
  "primaryKey": false,
1467
- "notNull": false
1581
+ "notNull": true
1468
1582
  },
1469
1583
  "label": {
1470
1584
  "name": "label",
@@ -1512,7 +1626,15 @@
1512
1626
  },
1513
1627
  "indexes": {},
1514
1628
  "foreignKeys": {},
1515
- "compositePrimaryKeys": {},
1629
+ "compositePrimaryKeys": {
1630
+ "requests_template_tenant_id_id_pk": {
1631
+ "name": "requests_template_tenant_id_id_pk",
1632
+ "columns": [
1633
+ "tenant_id",
1634
+ "id"
1635
+ ]
1636
+ }
1637
+ },
1516
1638
  "uniqueConstraints": {},
1517
1639
  "policies": {},
1518
1640
  "checkConstraints": {},
@@ -1525,7 +1647,7 @@
1525
1647
  "id": {
1526
1648
  "name": "id",
1527
1649
  "type": "uuid",
1528
- "primaryKey": true,
1650
+ "primaryKey": false,
1529
1651
  "notNull": true,
1530
1652
  "default": "gen_random_uuid()"
1531
1653
  },
@@ -1533,7 +1655,7 @@
1533
1655
  "name": "tenant_id",
1534
1656
  "type": "uuid",
1535
1657
  "primaryKey": false,
1536
- "notNull": false
1658
+ "notNull": true
1537
1659
  },
1538
1660
  "label": {
1539
1661
  "name": "label",
@@ -1575,7 +1697,15 @@
1575
1697
  },
1576
1698
  "indexes": {},
1577
1699
  "foreignKeys": {},
1578
- "compositePrimaryKeys": {},
1700
+ "compositePrimaryKeys": {
1701
+ "tag_tenant_id_id_pk": {
1702
+ "name": "tag_tenant_id_id_pk",
1703
+ "columns": [
1704
+ "tenant_id",
1705
+ "id"
1706
+ ]
1707
+ }
1708
+ },
1579
1709
  "uniqueConstraints": {
1580
1710
  "tag_tenant_id_label_unique": {
1581
1711
  "name": "tag_tenant_id_label_unique",
@@ -1597,7 +1727,7 @@
1597
1727
  "id": {
1598
1728
  "name": "id",
1599
1729
  "type": "uuid",
1600
- "primaryKey": true,
1730
+ "primaryKey": false,
1601
1731
  "notNull": true,
1602
1732
  "default": "gen_random_uuid()"
1603
1733
  },
@@ -1653,36 +1783,40 @@
1653
1783
  },
1654
1784
  "indexes": {},
1655
1785
  "foreignKeys": {
1656
- "tag_assignment_document_id_document_id_fk": {
1657
- "name": "tag_assignment_document_id_document_id_fk",
1786
+ "tag_assignment_id_document_fkey": {
1787
+ "name": "tag_assignment_id_document_fkey",
1658
1788
  "tableFrom": "tag_assignment",
1659
1789
  "tableTo": "document",
1660
1790
  "schemaTo": "document_management",
1661
1791
  "columnsFrom": [
1792
+ "tenant_id",
1662
1793
  "document_id"
1663
1794
  ],
1664
1795
  "columnsTo": [
1796
+ "tenant_id",
1665
1797
  "id"
1666
1798
  ],
1667
1799
  "onDelete": "no action",
1668
1800
  "onUpdate": "no action"
1669
1801
  },
1670
- "tag_assignment_tag_id_tag_id_fk": {
1671
- "name": "tag_assignment_tag_id_tag_id_fk",
1802
+ "tag_assignment_id_tag_fkey": {
1803
+ "name": "tag_assignment_id_tag_fkey",
1672
1804
  "tableFrom": "tag_assignment",
1673
1805
  "tableTo": "tag",
1674
1806
  "schemaTo": "document_management",
1675
1807
  "columnsFrom": [
1808
+ "tenant_id",
1676
1809
  "tag_id"
1677
1810
  ],
1678
1811
  "columnsTo": [
1812
+ "tenant_id",
1679
1813
  "id"
1680
1814
  ],
1681
1815
  "onDelete": "no action",
1682
1816
  "onUpdate": "no action"
1683
1817
  },
1684
- "tag_assignment_tenantId_documentId_fkey": {
1685
- "name": "tag_assignment_tenantId_documentId_fkey",
1818
+ "tag_assignment_tenantId_documentId_document_fkey": {
1819
+ "name": "tag_assignment_tenantId_documentId_document_fkey",
1686
1820
  "tableFrom": "tag_assignment",
1687
1821
  "tableTo": "document",
1688
1822
  "schemaTo": "document_management",
@@ -1698,7 +1832,15 @@
1698
1832
  "onUpdate": "no action"
1699
1833
  }
1700
1834
  },
1701
- "compositePrimaryKeys": {},
1835
+ "compositePrimaryKeys": {
1836
+ "tag_assignment_tenant_id_id_pk": {
1837
+ "name": "tag_assignment_tenant_id_id_pk",
1838
+ "columns": [
1839
+ "tenant_id",
1840
+ "id"
1841
+ ]
1842
+ }
1843
+ },
1702
1844
  "uniqueConstraints": {
1703
1845
  "tag_assignment_tenant_id_document_id_tag_id_unique": {
1704
1846
  "name": "tag_assignment_tenant_id_document_id_tag_id_unique",
@@ -1721,7 +1863,7 @@
1721
1863
  "id": {
1722
1864
  "name": "id",
1723
1865
  "type": "uuid",
1724
- "primaryKey": true,
1866
+ "primaryKey": false,
1725
1867
  "notNull": true,
1726
1868
  "default": "gen_random_uuid()"
1727
1869
  },
@@ -1729,7 +1871,7 @@
1729
1871
  "name": "tenant_id",
1730
1872
  "type": "uuid",
1731
1873
  "primaryKey": false,
1732
- "notNull": false
1874
+ "notNull": true
1733
1875
  },
1734
1876
  "category_id": {
1735
1877
  "name": "category_id",
@@ -1777,22 +1919,32 @@
1777
1919
  },
1778
1920
  "indexes": {},
1779
1921
  "foreignKeys": {
1780
- "type_category_id_category_id_fk": {
1781
- "name": "type_category_id_category_id_fk",
1922
+ "type_id_category_fkey": {
1923
+ "name": "type_id_category_fkey",
1782
1924
  "tableFrom": "type",
1783
1925
  "tableTo": "category",
1784
1926
  "schemaTo": "document_management",
1785
1927
  "columnsFrom": [
1928
+ "tenant_id",
1786
1929
  "category_id"
1787
1930
  ],
1788
1931
  "columnsTo": [
1932
+ "tenant_id",
1789
1933
  "id"
1790
1934
  ],
1791
1935
  "onDelete": "no action",
1792
1936
  "onUpdate": "no action"
1793
1937
  }
1794
1938
  },
1795
- "compositePrimaryKeys": {},
1939
+ "compositePrimaryKeys": {
1940
+ "type_tenant_id_id_pk": {
1941
+ "name": "type_tenant_id_id_pk",
1942
+ "columns": [
1943
+ "tenant_id",
1944
+ "id"
1945
+ ]
1946
+ }
1947
+ },
1796
1948
  "uniqueConstraints": {
1797
1949
  "type_tenant_id_category_id_label_unique": {
1798
1950
  "name": "type_tenant_id_category_id_label_unique",
@@ -1815,7 +1967,7 @@
1815
1967
  "id": {
1816
1968
  "name": "id",
1817
1969
  "type": "uuid",
1818
- "primaryKey": true,
1970
+ "primaryKey": false,
1819
1971
  "notNull": true,
1820
1972
  "default": "gen_random_uuid()"
1821
1973
  },
@@ -1823,7 +1975,7 @@
1823
1975
  "name": "tenant_id",
1824
1976
  "type": "uuid",
1825
1977
  "primaryKey": false,
1826
- "notNull": false
1978
+ "notNull": true
1827
1979
  },
1828
1980
  "type_id": {
1829
1981
  "name": "type_id",
@@ -1871,36 +2023,48 @@
1871
2023
  },
1872
2024
  "indexes": {},
1873
2025
  "foreignKeys": {
1874
- "type_property_type_id_type_id_fk": {
1875
- "name": "type_property_type_id_type_id_fk",
2026
+ "type_property_id_type_fkey": {
2027
+ "name": "type_property_id_type_fkey",
1876
2028
  "tableFrom": "type_property",
1877
2029
  "tableTo": "type",
1878
2030
  "schemaTo": "document_management",
1879
2031
  "columnsFrom": [
2032
+ "tenant_id",
1880
2033
  "type_id"
1881
2034
  ],
1882
2035
  "columnsTo": [
2036
+ "tenant_id",
1883
2037
  "id"
1884
2038
  ],
1885
2039
  "onDelete": "no action",
1886
2040
  "onUpdate": "no action"
1887
2041
  },
1888
- "type_property_property_id_property_id_fk": {
1889
- "name": "type_property_property_id_property_id_fk",
2042
+ "type_property_id_property_fkey": {
2043
+ "name": "type_property_id_property_fkey",
1890
2044
  "tableFrom": "type_property",
1891
2045
  "tableTo": "property",
1892
2046
  "schemaTo": "document_management",
1893
2047
  "columnsFrom": [
2048
+ "tenant_id",
1894
2049
  "property_id"
1895
2050
  ],
1896
2051
  "columnsTo": [
2052
+ "tenant_id",
1897
2053
  "id"
1898
2054
  ],
1899
2055
  "onDelete": "no action",
1900
2056
  "onUpdate": "no action"
1901
2057
  }
1902
2058
  },
1903
- "compositePrimaryKeys": {},
2059
+ "compositePrimaryKeys": {
2060
+ "type_property_tenant_id_id_pk": {
2061
+ "name": "type_property_tenant_id_id_pk",
2062
+ "columns": [
2063
+ "tenant_id",
2064
+ "id"
2065
+ ]
2066
+ }
2067
+ },
1904
2068
  "uniqueConstraints": {
1905
2069
  "type_property_tenant_id_type_id_property_id_unique": {
1906
2070
  "name": "type_property_tenant_id_type_id_property_id_unique",
@@ -1923,7 +2087,7 @@
1923
2087
  "id": {
1924
2088
  "name": "id",
1925
2089
  "type": "uuid",
1926
- "primaryKey": true,
2090
+ "primaryKey": false,
1927
2091
  "notNull": true,
1928
2092
  "default": "gen_random_uuid()"
1929
2093
  },
@@ -1931,7 +2095,7 @@
1931
2095
  "name": "tenant_id",
1932
2096
  "type": "uuid",
1933
2097
  "primaryKey": false,
1934
- "notNull": false
2098
+ "notNull": true
1935
2099
  },
1936
2100
  "type_id": {
1937
2101
  "name": "type_id",
@@ -1995,36 +2159,48 @@
1995
2159
  }
1996
2160
  },
1997
2161
  "foreignKeys": {
1998
- "document_type_validation_type_id_type_id_fk": {
1999
- "name": "document_type_validation_type_id_type_id_fk",
2162
+ "document_type_validation_id_type_fkey": {
2163
+ "name": "document_type_validation_id_type_fkey",
2000
2164
  "tableFrom": "document_type_validation",
2001
2165
  "tableTo": "type",
2002
2166
  "schemaTo": "document_management",
2003
2167
  "columnsFrom": [
2168
+ "tenant_id",
2004
2169
  "type_id"
2005
2170
  ],
2006
2171
  "columnsTo": [
2172
+ "tenant_id",
2007
2173
  "id"
2008
2174
  ],
2009
2175
  "onDelete": "no action",
2010
2176
  "onUpdate": "no action"
2011
2177
  },
2012
- "document_type_validation_validation_id_validation_definition_id_fk": {
2013
- "name": "document_type_validation_validation_id_validation_definition_id_fk",
2178
+ "document_type_validation_id_validation_definition_fkey": {
2179
+ "name": "document_type_validation_id_validation_definition_fkey",
2014
2180
  "tableFrom": "document_type_validation",
2015
2181
  "tableTo": "validation_definition",
2016
2182
  "schemaTo": "document_management",
2017
2183
  "columnsFrom": [
2184
+ "tenant_id",
2018
2185
  "validation_id"
2019
2186
  ],
2020
2187
  "columnsTo": [
2188
+ "tenant_id",
2021
2189
  "id"
2022
2190
  ],
2023
2191
  "onDelete": "no action",
2024
2192
  "onUpdate": "no action"
2025
2193
  }
2026
2194
  },
2027
- "compositePrimaryKeys": {},
2195
+ "compositePrimaryKeys": {
2196
+ "document_type_validation_tenant_id_id_pk": {
2197
+ "name": "document_type_validation_tenant_id_id_pk",
2198
+ "columns": [
2199
+ "tenant_id",
2200
+ "id"
2201
+ ]
2202
+ }
2203
+ },
2028
2204
  "uniqueConstraints": {
2029
2205
  "document_type_validation_tenant_id_type_id_validation_id_unique": {
2030
2206
  "name": "document_type_validation_tenant_id_type_id_validation_id_unique",
@@ -2047,7 +2223,7 @@
2047
2223
  "id": {
2048
2224
  "name": "id",
2049
2225
  "type": "uuid",
2050
- "primaryKey": true,
2226
+ "primaryKey": false,
2051
2227
  "notNull": true,
2052
2228
  "default": "gen_random_uuid()"
2053
2229
  },
@@ -2055,7 +2231,7 @@
2055
2231
  "name": "tenant_id",
2056
2232
  "type": "uuid",
2057
2233
  "primaryKey": false,
2058
- "notNull": false
2234
+ "notNull": true
2059
2235
  },
2060
2236
  "identifier": {
2061
2237
  "name": "identifier",
@@ -2115,7 +2291,15 @@
2115
2291
  },
2116
2292
  "indexes": {},
2117
2293
  "foreignKeys": {},
2118
- "compositePrimaryKeys": {},
2294
+ "compositePrimaryKeys": {
2295
+ "validation_definition_tenant_id_id_pk": {
2296
+ "name": "validation_definition_tenant_id_id_pk",
2297
+ "columns": [
2298
+ "tenant_id",
2299
+ "id"
2300
+ ]
2301
+ }
2302
+ },
2119
2303
  "uniqueConstraints": {},
2120
2304
  "policies": {},
2121
2305
  "checkConstraints": {},
@@ -2128,7 +2312,7 @@
2128
2312
  "id": {
2129
2313
  "name": "id",
2130
2314
  "type": "uuid",
2131
- "primaryKey": true,
2315
+ "primaryKey": false,
2132
2316
  "notNull": true,
2133
2317
  "default": "gen_random_uuid()"
2134
2318
  },
@@ -2216,36 +2400,40 @@
2216
2400
  },
2217
2401
  "indexes": {},
2218
2402
  "foreignKeys": {
2219
- "validation_execution_workflow_id_workflow_id_fk": {
2220
- "name": "validation_execution_workflow_id_workflow_id_fk",
2403
+ "validation_execution_id_workflow_fkey": {
2404
+ "name": "validation_execution_id_workflow_fkey",
2221
2405
  "tableFrom": "validation_execution",
2222
2406
  "tableTo": "workflow",
2223
2407
  "schemaTo": "document_management",
2224
2408
  "columnsFrom": [
2409
+ "tenant_id",
2225
2410
  "workflow_id"
2226
2411
  ],
2227
2412
  "columnsTo": [
2413
+ "tenant_id",
2228
2414
  "id"
2229
2415
  ],
2230
2416
  "onDelete": "no action",
2231
2417
  "onUpdate": "no action"
2232
2418
  },
2233
- "validation_execution_definition_id_validation_definition_id_fk": {
2234
- "name": "validation_execution_definition_id_validation_definition_id_fk",
2419
+ "validation_execution_id_validation_definition_fkey": {
2420
+ "name": "validation_execution_id_validation_definition_fkey",
2235
2421
  "tableFrom": "validation_execution",
2236
2422
  "tableTo": "validation_definition",
2237
2423
  "schemaTo": "document_management",
2238
2424
  "columnsFrom": [
2425
+ "tenant_id",
2239
2426
  "definition_id"
2240
2427
  ],
2241
2428
  "columnsTo": [
2429
+ "tenant_id",
2242
2430
  "id"
2243
2431
  ],
2244
2432
  "onDelete": "no action",
2245
2433
  "onUpdate": "no action"
2246
2434
  },
2247
- "validation_execution_tenantId_workflowId_fkey": {
2248
- "name": "validation_execution_tenantId_workflowId_fkey",
2435
+ "validation_execution_tenantId_workflowId_workflow_fkey": {
2436
+ "name": "validation_execution_tenantId_workflowId_workflow_fkey",
2249
2437
  "tableFrom": "validation_execution",
2250
2438
  "tableTo": "workflow",
2251
2439
  "schemaTo": "document_management",
@@ -2261,7 +2449,15 @@
2261
2449
  "onUpdate": "no action"
2262
2450
  }
2263
2451
  },
2264
- "compositePrimaryKeys": {},
2452
+ "compositePrimaryKeys": {
2453
+ "validation_execution_tenant_id_id_pk": {
2454
+ "name": "validation_execution_tenant_id_id_pk",
2455
+ "columns": [
2456
+ "tenant_id",
2457
+ "id"
2458
+ ]
2459
+ }
2460
+ },
2265
2461
  "uniqueConstraints": {
2266
2462
  "validation_execution_tenant_id_workflow_id_definition_id_unique": {
2267
2463
  "name": "validation_execution_tenant_id_workflow_id_definition_id_unique",
@@ -2292,7 +2488,7 @@
2292
2488
  "id": {
2293
2489
  "name": "id",
2294
2490
  "type": "uuid",
2295
- "primaryKey": true,
2491
+ "primaryKey": false,
2296
2492
  "notNull": true,
2297
2493
  "default": "gen_random_uuid()"
2298
2494
  },
@@ -2348,36 +2544,40 @@
2348
2544
  },
2349
2545
  "indexes": {},
2350
2546
  "foreignKeys": {
2351
- "validation_execution_related_document_execution_id_validation_execution_id_fk": {
2352
- "name": "validation_execution_related_document_execution_id_validation_execution_id_fk",
2547
+ "verd_id_ve_fkey": {
2548
+ "name": "verd_id_ve_fkey",
2353
2549
  "tableFrom": "validation_execution_related_document",
2354
2550
  "tableTo": "validation_execution",
2355
2551
  "schemaTo": "document_management",
2356
2552
  "columnsFrom": [
2553
+ "tenant_id",
2357
2554
  "execution_id"
2358
2555
  ],
2359
2556
  "columnsTo": [
2557
+ "tenant_id",
2360
2558
  "id"
2361
2559
  ],
2362
2560
  "onDelete": "no action",
2363
2561
  "onUpdate": "no action"
2364
2562
  },
2365
- "validation_execution_related_document_document_id_document_id_fk": {
2366
- "name": "validation_execution_related_document_document_id_document_id_fk",
2563
+ "validation_execution_related_document_id_document_fkey": {
2564
+ "name": "validation_execution_related_document_id_document_fkey",
2367
2565
  "tableFrom": "validation_execution_related_document",
2368
2566
  "tableTo": "document",
2369
2567
  "schemaTo": "document_management",
2370
2568
  "columnsFrom": [
2569
+ "tenant_id",
2371
2570
  "document_id"
2372
2571
  ],
2373
2572
  "columnsTo": [
2573
+ "tenant_id",
2374
2574
  "id"
2375
2575
  ],
2376
2576
  "onDelete": "no action",
2377
2577
  "onUpdate": "no action"
2378
2578
  },
2379
- "validation_execution_related_document_tenantId_documentId_fkey": {
2380
- "name": "validation_execution_related_document_tenantId_documentId_fkey",
2579
+ "verd_tenantId_documentId_d_fkey": {
2580
+ "name": "verd_tenantId_documentId_d_fkey",
2381
2581
  "tableFrom": "validation_execution_related_document",
2382
2582
  "tableTo": "document",
2383
2583
  "schemaTo": "document_management",
@@ -2392,8 +2592,8 @@
2392
2592
  "onDelete": "no action",
2393
2593
  "onUpdate": "no action"
2394
2594
  },
2395
- "validation_execution_related_document_tenantId_executionId_fkey": {
2396
- "name": "validation_execution_related_document_tenantId_executionId_fkey",
2595
+ "verd_tenantId_executionId_ve_fkey": {
2596
+ "name": "verd_tenantId_executionId_ve_fkey",
2397
2597
  "tableFrom": "validation_execution_related_document",
2398
2598
  "tableTo": "validation_execution",
2399
2599
  "schemaTo": "document_management",
@@ -2409,7 +2609,15 @@
2409
2609
  "onUpdate": "no action"
2410
2610
  }
2411
2611
  },
2412
- "compositePrimaryKeys": {},
2612
+ "compositePrimaryKeys": {
2613
+ "validation_execution_related_document_tenant_id_id_pk": {
2614
+ "name": "validation_execution_related_document_tenant_id_id_pk",
2615
+ "columns": [
2616
+ "tenant_id",
2617
+ "id"
2618
+ ]
2619
+ }
2620
+ },
2413
2621
  "uniqueConstraints": {
2414
2622
  "verd_tenant_id_execution_id_document_id_unique": {
2415
2623
  "name": "verd_tenant_id_execution_id_document_id_unique",
@@ -2432,7 +2640,7 @@
2432
2640
  "id": {
2433
2641
  "name": "id",
2434
2642
  "type": "uuid",
2435
- "primaryKey": true,
2643
+ "primaryKey": false,
2436
2644
  "notNull": true,
2437
2645
  "default": "gen_random_uuid()"
2438
2646
  },
@@ -2532,22 +2740,24 @@
2532
2740
  }
2533
2741
  },
2534
2742
  "foreignKeys": {
2535
- "workflow_document_id_document_id_fk": {
2536
- "name": "workflow_document_id_document_id_fk",
2743
+ "workflow_id_document_fkey": {
2744
+ "name": "workflow_id_document_fkey",
2537
2745
  "tableFrom": "workflow",
2538
2746
  "tableTo": "document",
2539
2747
  "schemaTo": "document_management",
2540
2748
  "columnsFrom": [
2749
+ "tenant_id",
2541
2750
  "document_id"
2542
2751
  ],
2543
2752
  "columnsTo": [
2753
+ "tenant_id",
2544
2754
  "id"
2545
2755
  ],
2546
2756
  "onDelete": "no action",
2547
2757
  "onUpdate": "no action"
2548
2758
  },
2549
- "workflow_tenantId_documentId_fkey": {
2550
- "name": "workflow_tenantId_documentId_fkey",
2759
+ "workflow_tenantId_documentId_document_fkey": {
2760
+ "name": "workflow_tenantId_documentId_document_fkey",
2551
2761
  "tableFrom": "workflow",
2552
2762
  "tableTo": "document",
2553
2763
  "schemaTo": "document_management",
@@ -2563,7 +2773,15 @@
2563
2773
  "onUpdate": "no action"
2564
2774
  }
2565
2775
  },
2566
- "compositePrimaryKeys": {},
2776
+ "compositePrimaryKeys": {
2777
+ "workflow_tenant_id_id_pk": {
2778
+ "name": "workflow_tenant_id_id_pk",
2779
+ "columns": [
2780
+ "tenant_id",
2781
+ "id"
2782
+ ]
2783
+ }
2784
+ },
2567
2785
  "uniqueConstraints": {
2568
2786
  "workflow_tenant_id_id_unique": {
2569
2787
  "name": "workflow_tenant_id_id_unique",