@tstdl/base 0.92.85 → 0.92.87

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 (152) hide show
  1. package/ai/ai.service.d.ts +4 -4
  2. package/ai/ai.service.js +27 -14
  3. package/ai/types.d.ts +5 -4
  4. package/api/server/gateway.js +1 -1
  5. package/authentication/authentication.api.d.ts +9 -9
  6. package/authentication/models/schemas.d.ts +2 -2
  7. package/authentication/server/authentication-ancillary.service.d.ts +6 -4
  8. package/authentication/server/authentication-ancillary.service.js +5 -5
  9. package/cancellation/token.d.ts +1 -1
  10. package/context/context.d.ts +1 -9
  11. package/context/context.js +8 -5
  12. package/document-management/api/document-management.api.d.ts +142 -110
  13. package/document-management/models/document-category.model.d.ts +1 -0
  14. package/document-management/models/document-category.model.js +2 -0
  15. package/document-management/models/document-collection-document.model.js +7 -3
  16. package/document-management/models/document-property-value.model.d.ts +13 -14
  17. package/document-management/models/document-property-value.model.js +60 -27
  18. package/document-management/models/document-property.model.d.ts +2 -0
  19. package/document-management/models/document-property.model.js +4 -1
  20. package/document-management/models/document-request-assignment-task-collection.model.d.ts +7 -0
  21. package/document-management/models/document-request-assignment-task-collection.model.js +32 -0
  22. package/document-management/models/document-request-assignment-task.model.d.ts +14 -0
  23. package/document-management/models/document-request-assignment-task.model.js +72 -0
  24. package/document-management/models/document-request-collection.model.d.ts +1 -0
  25. package/document-management/models/document-request-collection.model.js +7 -3
  26. package/document-management/models/document-request-file.model.d.ts +7 -2
  27. package/document-management/models/document-request-file.model.js +29 -4
  28. package/document-management/models/document-request.model.d.ts +1 -0
  29. package/document-management/models/document-requests-template.js +2 -0
  30. package/document-management/models/document-type-property.model.js +7 -3
  31. package/document-management/models/document-type.model.d.ts +1 -0
  32. package/document-management/models/document-type.model.js +7 -3
  33. package/document-management/models/document.model.d.ts +5 -2
  34. package/document-management/models/document.model.js +21 -6
  35. package/document-management/models/index.d.ts +2 -0
  36. package/document-management/models/index.js +2 -0
  37. package/document-management/models/service-models/document.service-model.d.ts +84 -65
  38. package/document-management/models/service-models/document.service-model.js +11 -6
  39. package/document-management/models/service-models/document.view-model.d.ts +1 -1
  40. package/document-management/models/service-models/document.view-model.js +2 -2
  41. package/document-management/server/drizzle/{0000_sloppy_fenris.sql → 0000_cool_victor_mancha.sql} +99 -43
  42. package/document-management/server/drizzle/meta/0000_snapshot.json +518 -130
  43. package/document-management/server/drizzle/meta/_journal.json +2 -2
  44. package/document-management/server/drizzle.config.js +1 -1
  45. package/document-management/server/module.d.ts +3 -2
  46. package/document-management/server/module.js +4 -2
  47. package/document-management/server/schemas.d.ts +36 -0
  48. package/document-management/server/schemas.js +37 -0
  49. package/document-management/server/services/document-management-ancillary.service.d.ts +4 -0
  50. package/document-management/server/services/document-management-ancillary.service.js +13 -0
  51. package/document-management/server/services/document-management.service.d.ts +71 -22
  52. package/document-management/server/services/document-management.service.js +528 -81
  53. package/document-management/server/services/index.d.ts +1 -0
  54. package/document-management/server/services/index.js +1 -0
  55. package/eslint.config.js +1 -0
  56. package/examples/document-management/main.d.ts +5 -0
  57. package/examples/document-management/main.js +20 -2
  58. package/examples/orm/schemas.d.ts +1 -1
  59. package/file/index.d.ts +1 -0
  60. package/file/index.js +1 -0
  61. package/file/temporary-file.d.ts +17 -0
  62. package/file/temporary-file.js +49 -0
  63. package/http/server/http-server-response.d.ts +2 -0
  64. package/http/server/http-server-response.js +13 -0
  65. package/injector/index.d.ts +1 -0
  66. package/injector/index.js +1 -0
  67. package/injector/injector.js +19 -7
  68. package/injector/interfaces.d.ts +1 -1
  69. package/injector/interfaces.js +1 -1
  70. package/injector/resolution.d.ts +15 -0
  71. package/injector/resolution.js +6 -0
  72. package/logger/console/logger.d.ts +1 -1
  73. package/logger/logger.d.ts +1 -1
  74. package/mail/drizzle.config.js +1 -1
  75. package/mail/models/schemas.d.ts +1 -1
  76. package/object-storage/object-storage.d.ts +5 -7
  77. package/object-storage/s3/s3.object-storage.d.ts +0 -1
  78. package/object-storage/s3/s3.object-storage.js +0 -3
  79. package/orm/{server/data-types → data-types}/numeric-date.js +2 -3
  80. package/orm/decorators.d.ts +17 -8
  81. package/orm/decorators.js +13 -7
  82. package/orm/entity.d.ts +5 -7
  83. package/orm/entity.js +11 -7
  84. package/orm/index.d.ts +2 -0
  85. package/orm/index.js +2 -0
  86. package/orm/query.d.ts +1 -3
  87. package/orm/query.js +0 -1
  88. package/orm/repository.types.d.ts +32 -0
  89. package/orm/repository.types.js +1 -0
  90. package/orm/server/database-schema.d.ts +4 -4
  91. package/orm/server/drizzle/schema-converter.d.ts +1 -1
  92. package/orm/server/drizzle/schema-converter.js +48 -19
  93. package/orm/server/index.d.ts +1 -0
  94. package/orm/server/index.js +1 -0
  95. package/orm/server/query-converter.d.ts +1 -2
  96. package/orm/server/query-converter.js +66 -61
  97. package/orm/server/repository.d.ts +80 -43
  98. package/orm/server/repository.js +219 -112
  99. package/orm/server/sqls.d.ts +15 -0
  100. package/orm/server/sqls.js +19 -0
  101. package/orm/server/types.d.ts +3 -3
  102. package/orm/types.d.ts +4 -4
  103. package/orm/utils.d.ts +3 -0
  104. package/orm/utils.js +6 -0
  105. package/package.json +23 -19
  106. package/pdf/pdf.service.d.ts +0 -1
  107. package/pdf/pdf.service.js +1 -95
  108. package/pdf/utils.d.ts +3 -1
  109. package/pdf/utils.js +129 -4
  110. package/promise/lazy-promise.d.ts +3 -3
  111. package/queue/enqueue-batch.d.ts +1 -0
  112. package/queue/enqueue-batch.js +1 -1
  113. package/queue/mongo/queue.d.ts +9 -4
  114. package/queue/mongo/queue.js +5 -6
  115. package/queue/postgres/drizzle/0000_zippy_moondragon.sql +11 -0
  116. package/queue/postgres/drizzle/meta/0000_snapshot.json +90 -0
  117. package/queue/postgres/drizzle/meta/_journal.json +13 -0
  118. package/queue/postgres/drizzle.config.d.ts +2 -0
  119. package/queue/postgres/drizzle.config.js +11 -0
  120. package/queue/postgres/index.d.ts +4 -0
  121. package/queue/postgres/index.js +4 -0
  122. package/queue/postgres/job.model.d.ts +13 -0
  123. package/queue/postgres/job.model.js +55 -0
  124. package/queue/postgres/module.d.ts +9 -0
  125. package/queue/postgres/module.js +29 -0
  126. package/queue/postgres/queue.d.ts +28 -0
  127. package/queue/postgres/queue.js +147 -0
  128. package/queue/postgres/queue.provider.d.ts +7 -0
  129. package/queue/postgres/queue.provider.js +21 -0
  130. package/queue/postgres/schemas.d.ts +3 -0
  131. package/queue/postgres/schemas.js +4 -0
  132. package/queue/provider.d.ts +2 -1
  133. package/queue/queue.d.ts +32 -6
  134. package/queue/queue.js +43 -0
  135. package/schema/schemas/object.d.ts +1 -1
  136. package/utils/date-time.d.ts +4 -2
  137. package/utils/date-time.js +10 -3
  138. package/utils/format-error.js +0 -1
  139. package/utils/object/lazy-property.js +0 -1
  140. package/utils/timing.d.ts +4 -3
  141. package/utils/timing.js +3 -1
  142. package/utils/try-ignore.d.ts +9 -2
  143. package/utils/try-ignore.js +30 -6
  144. package/document-management/models/schemas.d.ts +0 -33
  145. package/document-management/models/schemas.js +0 -34
  146. /package/orm/{server/data-types → data-types}/bytea.d.ts +0 -0
  147. /package/orm/{server/data-types → data-types}/bytea.js +0 -0
  148. /package/orm/{server/data-types → data-types}/index.d.ts +0 -0
  149. /package/orm/{server/data-types → data-types}/index.js +0 -0
  150. /package/orm/{server/data-types → data-types}/numeric-date.d.ts +0 -0
  151. /package/orm/{server/data-types → data-types}/timestamp.d.ts +0 -0
  152. /package/orm/{server/data-types → data-types}/timestamp.js +0 -0
@@ -1,11 +1,14 @@
1
- CREATE TYPE "document_management"."document_property_data_type" AS ENUM('text', 'integer', 'decimal', 'boolean');--> statement-breakpoint
1
+ CREATE TYPE "document_management"."document_property_data_type" AS ENUM('text', 'integer', 'decimal', 'boolean', 'date');--> statement-breakpoint
2
2
  CREATE TABLE "document_management"."document" (
3
3
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
4
4
  "file_id" uuid NOT NULL,
5
5
  "type_id" uuid,
6
- "addition" text,
6
+ "title" text,
7
+ "subtitle" text,
8
+ "pages" integer,
7
9
  "date" date,
8
- "expiration" date,
10
+ "summary" text,
11
+ "tags" text[],
9
12
  "revision" integer NOT NULL,
10
13
  "revision_timestamp" timestamp with time zone NOT NULL,
11
14
  "create_timestamp" timestamp with time zone NOT NULL,
@@ -20,7 +23,8 @@ CREATE TABLE "document_management"."document_category" (
20
23
  "revision_timestamp" timestamp with time zone NOT NULL,
21
24
  "create_timestamp" timestamp with time zone NOT NULL,
22
25
  "delete_timestamp" timestamp with time zone,
23
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
26
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
27
+ CONSTRAINT "document_category_label_unique" UNIQUE("label")
24
28
  );
25
29
  --> statement-breakpoint
26
30
  CREATE TABLE "document_management"."document_collection" (
@@ -41,7 +45,8 @@ CREATE TABLE "document_management"."document_collection_document" (
41
45
  "revision_timestamp" timestamp with time zone NOT NULL,
42
46
  "create_timestamp" timestamp with time zone NOT NULL,
43
47
  "delete_timestamp" timestamp with time zone,
44
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
48
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
49
+ CONSTRAINT "document_collection_document_collection_id_document_id_unique" UNIQUE("collection_id","document_id")
45
50
  );
46
51
  --> statement-breakpoint
47
52
  CREATE TABLE "document_management"."document_file" (
@@ -65,26 +70,34 @@ CREATE TABLE "document_management"."document_property" (
65
70
  "revision_timestamp" timestamp with time zone NOT NULL,
66
71
  "create_timestamp" timestamp with time zone NOT NULL,
67
72
  "delete_timestamp" timestamp with time zone,
68
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
73
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
74
+ CONSTRAINT "document_property_label_unique" UNIQUE("label")
69
75
  );
70
76
  --> statement-breakpoint
71
- CREATE TABLE "document_management"."document_property_boolean_value" (
77
+ CREATE TABLE "document_management"."document_property_value" (
72
78
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
73
- "document_id" uuid NOT NULL,
74
79
  "property_id" uuid NOT NULL,
75
- "value" boolean,
80
+ "text" text,
81
+ "integer" integer,
82
+ "decimal" double precision,
83
+ "boolean" boolean,
84
+ "date" date,
85
+ "document_id" uuid NOT NULL,
76
86
  "revision" integer NOT NULL,
77
87
  "revision_timestamp" timestamp with time zone NOT NULL,
78
88
  "create_timestamp" timestamp with time zone NOT NULL,
79
89
  "delete_timestamp" timestamp with time zone,
80
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
90
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
91
+ CONSTRAINT "document_property_value_document_id_property_id_unique" UNIQUE("document_id","property_id"),
92
+ CONSTRAINT "only_one_value" CHECK (num_nonnulls("document_management"."document_property_value"."text", "document_management"."document_property_value"."integer", "document_management"."document_property_value"."decimal", "document_management"."document_property_value"."boolean", "document_management"."document_property_value"."date") = 1)
81
93
  );
82
94
  --> statement-breakpoint
83
- CREATE TABLE "document_management"."document_property_decimal_value" (
95
+ CREATE TABLE "document_management"."document_request" (
84
96
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
85
- "document_id" uuid NOT NULL,
86
- "property_id" uuid NOT NULL,
87
- "value" double precision,
97
+ "type_id" uuid,
98
+ "required_files_count" integer NOT NULL,
99
+ "comment" text,
100
+ "completed" boolean NOT NULL,
88
101
  "revision" integer NOT NULL,
89
102
  "revision_timestamp" timestamp with time zone NOT NULL,
90
103
  "create_timestamp" timestamp with time zone NOT NULL,
@@ -92,41 +105,54 @@ CREATE TABLE "document_management"."document_property_decimal_value" (
92
105
  "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
93
106
  );
94
107
  --> statement-breakpoint
95
- CREATE TABLE "document_management"."document_property_integer_value" (
108
+ CREATE TABLE "document_management"."document_request_assignment_task" (
96
109
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
97
- "document_id" uuid NOT NULL,
98
- "property_id" uuid NOT NULL,
99
- "value" integer,
110
+ "file_id" uuid NOT NULL,
111
+ "assigned_request_file_id" uuid,
112
+ "type_id" uuid,
113
+ "title" text,
114
+ "subtitle" text,
115
+ "pages" integer,
116
+ "date" date,
117
+ "summary" text,
118
+ "tags" text[],
119
+ "assignment_tries" integer NOT NULL,
100
120
  "revision" integer NOT NULL,
101
121
  "revision_timestamp" timestamp with time zone NOT NULL,
102
122
  "create_timestamp" timestamp with time zone NOT NULL,
103
123
  "delete_timestamp" timestamp with time zone,
104
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
124
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
125
+ CONSTRAINT "drat_file_id_unique" UNIQUE("file_id")
105
126
  );
106
127
  --> statement-breakpoint
107
- CREATE TABLE "document_management"."document_property_text_value" (
128
+ CREATE TABLE "document_management"."document_request_assignment_task_collection" (
108
129
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
109
- "document_id" uuid NOT NULL,
110
- "property_id" uuid NOT NULL,
111
- "value" text,
130
+ "request_assignment_task_id" uuid NOT NULL,
131
+ "collection_id" uuid NOT NULL,
112
132
  "revision" integer NOT NULL,
113
133
  "revision_timestamp" timestamp with time zone NOT NULL,
114
134
  "create_timestamp" timestamp with time zone NOT NULL,
115
135
  "delete_timestamp" timestamp with time zone,
116
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
136
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
137
+ CONSTRAINT "dratc_request_assignment_task_id_collection_id_unique" UNIQUE("request_assignment_task_id","collection_id")
117
138
  );
118
139
  --> statement-breakpoint
119
- CREATE TABLE "document_management"."document_request" (
140
+ CREATE TABLE "document_management"."document_request_assignment_task_property_value" (
120
141
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
121
- "type_id" uuid,
122
- "required_files_count" integer NOT NULL,
123
- "comment" text,
124
- "completed" boolean NOT NULL,
142
+ "property_id" uuid NOT NULL,
143
+ "text" text,
144
+ "integer" integer,
145
+ "decimal" double precision,
146
+ "boolean" boolean,
147
+ "date" date,
148
+ "request_assignment_task_id" uuid NOT NULL,
125
149
  "revision" integer NOT NULL,
126
150
  "revision_timestamp" timestamp with time zone NOT NULL,
127
151
  "create_timestamp" timestamp with time zone NOT NULL,
128
152
  "delete_timestamp" timestamp with time zone,
129
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
153
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
154
+ CONSTRAINT "dratpv_request_assignment_task_id_property_id_unique" UNIQUE("request_assignment_task_id","property_id"),
155
+ CONSTRAINT "only_one_value" CHECK (num_nonnulls("document_management"."document_request_assignment_task_property_value"."text", "document_management"."document_request_assignment_task_property_value"."integer", "document_management"."document_request_assignment_task_property_value"."decimal", "document_management"."document_request_assignment_task_property_value"."boolean", "document_management"."document_request_assignment_task_property_value"."date") = 1)
130
156
  );
131
157
  --> statement-breakpoint
132
158
  CREATE TABLE "document_management"."document_request_collection" (
@@ -137,14 +163,20 @@ CREATE TABLE "document_management"."document_request_collection" (
137
163
  "revision_timestamp" timestamp with time zone NOT NULL,
138
164
  "create_timestamp" timestamp with time zone NOT NULL,
139
165
  "delete_timestamp" timestamp with time zone,
140
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
166
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
167
+ CONSTRAINT "document_request_collection_request_id_collection_id_unique" UNIQUE("request_id","collection_id")
141
168
  );
142
169
  --> statement-breakpoint
143
170
  CREATE TABLE "document_management"."document_request_file" (
144
171
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
145
172
  "request_id" uuid NOT NULL,
146
173
  "file_id" uuid NOT NULL,
147
- "addition" text,
174
+ "title" text,
175
+ "subtitle" text,
176
+ "pages" integer,
177
+ "date" date,
178
+ "summary" text,
179
+ "tags" text[],
148
180
  "created_document_id" uuid,
149
181
  "approval" boolean,
150
182
  "approval_comment" text,
@@ -156,6 +188,24 @@ CREATE TABLE "document_management"."document_request_file" (
156
188
  "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
157
189
  );
158
190
  --> statement-breakpoint
191
+ CREATE TABLE "document_management"."document_request_file_property_value" (
192
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
193
+ "property_id" uuid NOT NULL,
194
+ "text" text,
195
+ "integer" integer,
196
+ "decimal" double precision,
197
+ "boolean" boolean,
198
+ "date" date,
199
+ "request_file_id" uuid NOT NULL,
200
+ "revision" integer NOT NULL,
201
+ "revision_timestamp" timestamp with time zone NOT NULL,
202
+ "create_timestamp" timestamp with time zone NOT NULL,
203
+ "delete_timestamp" timestamp with time zone,
204
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
205
+ CONSTRAINT "drfpv_request_file_id_property_id_unique" UNIQUE("request_file_id","property_id"),
206
+ CONSTRAINT "only_one_value" CHECK (num_nonnulls("document_management"."document_request_file_property_value"."text", "document_management"."document_request_file_property_value"."integer", "document_management"."document_request_file_property_value"."decimal", "document_management"."document_request_file_property_value"."boolean", "document_management"."document_request_file_property_value"."date") = 1)
207
+ );
208
+ --> statement-breakpoint
159
209
  CREATE TABLE "document_management"."document_request_template" (
160
210
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
161
211
  "requests_template_id" uuid NOT NULL,
@@ -177,7 +227,8 @@ CREATE TABLE "document_management"."document_requests_template" (
177
227
  "revision_timestamp" timestamp with time zone NOT NULL,
178
228
  "create_timestamp" timestamp with time zone NOT NULL,
179
229
  "delete_timestamp" timestamp with time zone,
180
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
230
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
231
+ CONSTRAINT "document_requests_template_label_unique" UNIQUE("label")
181
232
  );
182
233
  --> statement-breakpoint
183
234
  CREATE TABLE "document_management"."document_type" (
@@ -189,7 +240,8 @@ CREATE TABLE "document_management"."document_type" (
189
240
  "revision_timestamp" timestamp with time zone NOT NULL,
190
241
  "create_timestamp" timestamp with time zone NOT NULL,
191
242
  "delete_timestamp" timestamp with time zone,
192
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
243
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
244
+ CONSTRAINT "document_type_category_id_label_unique" UNIQUE("category_id","label")
193
245
  );
194
246
  --> statement-breakpoint
195
247
  CREATE TABLE "document_management"."document_type_property" (
@@ -200,27 +252,31 @@ CREATE TABLE "document_management"."document_type_property" (
200
252
  "revision_timestamp" timestamp with time zone NOT NULL,
201
253
  "create_timestamp" timestamp with time zone NOT NULL,
202
254
  "delete_timestamp" timestamp with time zone,
203
- "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
255
+ "attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
256
+ CONSTRAINT "document_type_property_type_id_property_id_unique" UNIQUE("type_id","property_id")
204
257
  );
205
258
  --> statement-breakpoint
206
259
  ALTER TABLE "document_management"."document" ADD CONSTRAINT "document_file_id_document_file_id_fk" FOREIGN KEY ("file_id") REFERENCES "document_management"."document_file"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
207
260
  ALTER TABLE "document_management"."document" ADD CONSTRAINT "document_type_id_document_type_id_fk" FOREIGN KEY ("type_id") REFERENCES "document_management"."document_type"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
208
261
  ALTER TABLE "document_management"."document_collection_document" ADD CONSTRAINT "document_collection_document_collection_id_document_collection_id_fk" FOREIGN KEY ("collection_id") REFERENCES "document_management"."document_collection"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
209
262
  ALTER TABLE "document_management"."document_collection_document" ADD CONSTRAINT "document_collection_document_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
210
- ALTER TABLE "document_management"."document_property_boolean_value" ADD CONSTRAINT "document_property_boolean_value_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
211
- ALTER TABLE "document_management"."document_property_boolean_value" ADD CONSTRAINT "document_property_boolean_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
212
- ALTER TABLE "document_management"."document_property_decimal_value" ADD CONSTRAINT "document_property_decimal_value_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
213
- ALTER TABLE "document_management"."document_property_decimal_value" ADD CONSTRAINT "document_property_decimal_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
214
- ALTER TABLE "document_management"."document_property_integer_value" ADD CONSTRAINT "document_property_integer_value_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
215
- ALTER TABLE "document_management"."document_property_integer_value" ADD CONSTRAINT "document_property_integer_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
216
- ALTER TABLE "document_management"."document_property_text_value" ADD CONSTRAINT "document_property_text_value_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
217
- ALTER TABLE "document_management"."document_property_text_value" ADD CONSTRAINT "document_property_text_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
263
+ ALTER TABLE "document_management"."document_property_value" ADD CONSTRAINT "document_property_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
264
+ ALTER TABLE "document_management"."document_property_value" ADD CONSTRAINT "document_property_value_document_id_document_id_fk" FOREIGN KEY ("document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
218
265
  ALTER TABLE "document_management"."document_request" ADD CONSTRAINT "document_request_type_id_document_type_id_fk" FOREIGN KEY ("type_id") REFERENCES "document_management"."document_type"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
266
+ ALTER TABLE "document_management"."document_request_assignment_task" ADD CONSTRAINT "document_request_assignment_task_file_id_document_file_id_fk" FOREIGN KEY ("file_id") REFERENCES "document_management"."document_file"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
267
+ ALTER TABLE "document_management"."document_request_assignment_task" ADD CONSTRAINT "document_request_assignment_task_assigned_request_file_id_document_request_file_id_fk" FOREIGN KEY ("assigned_request_file_id") REFERENCES "document_management"."document_request_file"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
268
+ ALTER TABLE "document_management"."document_request_assignment_task" ADD CONSTRAINT "document_request_assignment_task_type_id_document_type_id_fk" FOREIGN KEY ("type_id") REFERENCES "document_management"."document_type"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
269
+ ALTER TABLE "document_management"."document_request_assignment_task_collection" ADD CONSTRAINT "document_request_assignment_task_collection_request_assignment_task_id_document_request_assignment_task_id_fk" FOREIGN KEY ("request_assignment_task_id") REFERENCES "document_management"."document_request_assignment_task"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
270
+ ALTER TABLE "document_management"."document_request_assignment_task_collection" ADD CONSTRAINT "document_request_assignment_task_collection_collection_id_document_collection_id_fk" FOREIGN KEY ("collection_id") REFERENCES "document_management"."document_collection"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
271
+ ALTER TABLE "document_management"."document_request_assignment_task_property_value" ADD CONSTRAINT "document_request_assignment_task_property_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
272
+ ALTER TABLE "document_management"."document_request_assignment_task_property_value" ADD CONSTRAINT "document_request_assignment_task_property_value_request_assignment_task_id_document_request_assignment_task_id_fk" FOREIGN KEY ("request_assignment_task_id") REFERENCES "document_management"."document_request_assignment_task"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
219
273
  ALTER TABLE "document_management"."document_request_collection" ADD CONSTRAINT "document_request_collection_request_id_document_request_id_fk" FOREIGN KEY ("request_id") REFERENCES "document_management"."document_request"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
220
274
  ALTER TABLE "document_management"."document_request_collection" ADD CONSTRAINT "document_request_collection_collection_id_document_collection_id_fk" FOREIGN KEY ("collection_id") REFERENCES "document_management"."document_collection"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
221
275
  ALTER TABLE "document_management"."document_request_file" ADD CONSTRAINT "document_request_file_request_id_document_request_id_fk" FOREIGN KEY ("request_id") REFERENCES "document_management"."document_request"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
222
276
  ALTER TABLE "document_management"."document_request_file" ADD CONSTRAINT "document_request_file_file_id_document_file_id_fk" FOREIGN KEY ("file_id") REFERENCES "document_management"."document_file"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
223
277
  ALTER TABLE "document_management"."document_request_file" ADD CONSTRAINT "document_request_file_created_document_id_document_id_fk" FOREIGN KEY ("created_document_id") REFERENCES "document_management"."document"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
278
+ ALTER TABLE "document_management"."document_request_file_property_value" ADD CONSTRAINT "document_request_file_property_value_property_id_document_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "document_management"."document_property"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
279
+ ALTER TABLE "document_management"."document_request_file_property_value" ADD CONSTRAINT "document_request_file_property_value_request_file_id_document_request_file_id_fk" FOREIGN KEY ("request_file_id") REFERENCES "document_management"."document_request_file"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
224
280
  ALTER TABLE "document_management"."document_request_template" ADD CONSTRAINT "document_request_template_requests_template_id_document_requests_template_id_fk" FOREIGN KEY ("requests_template_id") REFERENCES "document_management"."document_requests_template"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
225
281
  ALTER TABLE "document_management"."document_request_template" ADD CONSTRAINT "document_request_template_type_id_document_type_id_fk" FOREIGN KEY ("type_id") REFERENCES "document_management"."document_type"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
226
282
  ALTER TABLE "document_management"."document_type" ADD CONSTRAINT "document_type_category_id_document_category_id_fk" FOREIGN KEY ("category_id") REFERENCES "document_management"."document_category"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint