@valentine-efagene/qshelter-common 2.0.98 → 2.0.100
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.
- package/dist/generated/client/browser.d.ts +5 -0
- package/dist/generated/client/client.d.ts +5 -0
- package/dist/generated/client/commonInputTypes.d.ts +90 -0
- package/dist/generated/client/enums.d.ts +26 -0
- package/dist/generated/client/enums.js +23 -0
- package/dist/generated/client/internal/class.d.ts +11 -0
- package/dist/generated/client/internal/class.js +2 -2
- package/dist/generated/client/internal/prismaNamespace.d.ts +176 -1
- package/dist/generated/client/internal/prismaNamespace.js +95 -1
- package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +96 -0
- package/dist/generated/client/internal/prismaNamespaceBrowser.js +95 -1
- package/dist/generated/client/models/Amenity.d.ts +183 -3
- package/dist/generated/client/models/ApplicationDocument.d.ts +183 -1
- package/dist/generated/client/models/ApplicationEvent.d.ts +190 -14
- package/dist/generated/client/models/ApplicationPayment.d.ts +225 -1
- package/dist/generated/client/models/ApplicationPhase.d.ts +272 -26
- package/dist/generated/client/models/DocumentationPhase.d.ts +224 -24
- package/dist/generated/client/models/DocumentationStep.d.ts +237 -1
- package/dist/generated/client/models/DocumentationStepApproval.d.ts +159 -1
- package/dist/generated/client/models/DocumentationStepDocument.d.ts +150 -10
- package/dist/generated/client/models/EventHandlerExecution.d.ts +208 -14
- package/dist/generated/client/models/PaymentInstallment.d.ts +228 -14
- package/dist/generated/client/models/PaymentMethodPhaseDocument.d.ts +178 -14
- package/dist/generated/client/models/PaymentMethodPhaseField.d.ts +208 -14
- package/dist/generated/client/models/PaymentMethodPhaseStep.d.ts +180 -14
- package/dist/generated/client/models/PaymentPhase.d.ts +214 -14
- package/dist/generated/client/models/PhaseEventAttachment.d.ts +178 -14
- package/dist/generated/client/models/PropertyAmenity.d.ts +145 -11
- package/dist/generated/client/models/PropertyDocument.d.ts +164 -12
- package/dist/generated/client/models/PropertyMedia.d.ts +183 -17
- package/dist/generated/client/models/PropertyPaymentMethodLink.d.ts +159 -13
- package/dist/generated/client/models/PropertyPaymentMethodPhase.d.ts +270 -14
- package/dist/generated/client/models/PropertyUnit.d.ts +230 -14
- package/dist/generated/client/models/PropertyVariant.d.ts +256 -14
- package/dist/generated/client/models/PropertyVariantAmenity.d.ts +145 -11
- package/dist/generated/client/models/PropertyVariantMedia.d.ts +171 -13
- package/dist/generated/client/models/QuestionnaireField.d.ts +232 -14
- package/dist/generated/client/models/QuestionnairePhase.d.ts +207 -1
- package/dist/generated/client/models/StepEventAttachment.d.ts +178 -14
- package/dist/generated/client/models/Tenant.d.ts +11653 -1153
- package/dist/generated/client/models/WorkflowBlocker.d.ts +1432 -0
- package/dist/generated/client/models/WorkflowBlocker.js +1 -0
- package/dist/generated/client/models/index.d.ts +1 -0
- package/dist/generated/client/models/index.js +1 -0
- package/dist/generated/client/models.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/middleware/auth-context.d.ts +63 -6
- package/dist/src/middleware/auth-context.js +132 -13
- package/dist/src/prisma/tenant.js +26 -32
- package/dist/src/types/action-status.d.ts +137 -0
- package/dist/src/types/action-status.js +402 -0
- package/package.json +1 -1
- package/prisma/migrations/20260113000000_remove_workflow_analytics_summary/migration.sql +5 -0
- package/prisma/migrations/20260113110450_add_tenant_id_to_child_models/migration.sql +334 -0
- package/prisma/schema.prisma +273 -60
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[tenantId,name]` on the table `amenities` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
- Added the required column `tenantId` to the `amenities` table without a default value. This is not possible if the table is not empty.
|
|
6
|
+
- Added the required column `tenantId` to the `application_documents` table without a default value. This is not possible if the table is not empty.
|
|
7
|
+
- Added the required column `tenantId` to the `application_events` table without a default value. This is not possible if the table is not empty.
|
|
8
|
+
- Added the required column `tenantId` to the `application_payments` table without a default value. This is not possible if the table is not empty.
|
|
9
|
+
- Added the required column `tenantId` to the `application_phases` table without a default value. This is not possible if the table is not empty.
|
|
10
|
+
- Added the required column `tenantId` to the `documentation_phases` table without a default value. This is not possible if the table is not empty.
|
|
11
|
+
- Added the required column `tenantId` to the `documentation_step_approvals` table without a default value. This is not possible if the table is not empty.
|
|
12
|
+
- Added the required column `tenantId` to the `documentation_step_documents` table without a default value. This is not possible if the table is not empty.
|
|
13
|
+
- Added the required column `tenantId` to the `documentation_steps` table without a default value. This is not possible if the table is not empty.
|
|
14
|
+
- Added the required column `tenantId` to the `event_handler_executions` table without a default value. This is not possible if the table is not empty.
|
|
15
|
+
- Added the required column `tenantId` to the `payment_installments` table without a default value. This is not possible if the table is not empty.
|
|
16
|
+
- Added the required column `tenantId` to the `payment_method_phase_documents` table without a default value. This is not possible if the table is not empty.
|
|
17
|
+
- Added the required column `tenantId` to the `payment_method_phase_fields` table without a default value. This is not possible if the table is not empty.
|
|
18
|
+
- Added the required column `tenantId` to the `payment_method_phase_steps` table without a default value. This is not possible if the table is not empty.
|
|
19
|
+
- Added the required column `tenantId` to the `payment_phases` table without a default value. This is not possible if the table is not empty.
|
|
20
|
+
- Added the required column `tenantId` to the `phase_event_attachments` table without a default value. This is not possible if the table is not empty.
|
|
21
|
+
- Added the required column `tenantId` to the `property_amenities` table without a default value. This is not possible if the table is not empty.
|
|
22
|
+
- Added the required column `tenantId` to the `property_documents` table without a default value. This is not possible if the table is not empty.
|
|
23
|
+
- Added the required column `tenantId` to the `property_media` table without a default value. This is not possible if the table is not empty.
|
|
24
|
+
- Added the required column `tenantId` to the `property_payment_method_links` table without a default value. This is not possible if the table is not empty.
|
|
25
|
+
- Added the required column `tenantId` to the `property_payment_method_phases` table without a default value. This is not possible if the table is not empty.
|
|
26
|
+
- Added the required column `tenantId` to the `property_units` table without a default value. This is not possible if the table is not empty.
|
|
27
|
+
- Added the required column `tenantId` to the `property_variant_amenities` table without a default value. This is not possible if the table is not empty.
|
|
28
|
+
- Added the required column `tenantId` to the `property_variant_media` table without a default value. This is not possible if the table is not empty.
|
|
29
|
+
- Added the required column `tenantId` to the `property_variants` table without a default value. This is not possible if the table is not empty.
|
|
30
|
+
- Added the required column `tenantId` to the `questionnaire_fields` table without a default value. This is not possible if the table is not empty.
|
|
31
|
+
- Added the required column `tenantId` to the `questionnaire_phases` table without a default value. This is not possible if the table is not empty.
|
|
32
|
+
- Added the required column `tenantId` to the `step_event_attachments` table without a default value. This is not possible if the table is not empty.
|
|
33
|
+
|
|
34
|
+
*/
|
|
35
|
+
-- DropIndex
|
|
36
|
+
DROP INDEX `amenities_name_key` ON `amenities`;
|
|
37
|
+
|
|
38
|
+
-- AlterTable
|
|
39
|
+
ALTER TABLE `amenities` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
40
|
+
|
|
41
|
+
-- AlterTable
|
|
42
|
+
ALTER TABLE `application_documents` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
43
|
+
|
|
44
|
+
-- AlterTable
|
|
45
|
+
ALTER TABLE `application_events` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
46
|
+
|
|
47
|
+
-- AlterTable
|
|
48
|
+
ALTER TABLE `application_payments` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
49
|
+
|
|
50
|
+
-- AlterTable
|
|
51
|
+
ALTER TABLE `application_phases` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
52
|
+
|
|
53
|
+
-- AlterTable
|
|
54
|
+
ALTER TABLE `documentation_phases` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
55
|
+
|
|
56
|
+
-- AlterTable
|
|
57
|
+
ALTER TABLE `documentation_step_approvals` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
58
|
+
|
|
59
|
+
-- AlterTable
|
|
60
|
+
ALTER TABLE `documentation_step_documents` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
61
|
+
|
|
62
|
+
-- AlterTable
|
|
63
|
+
ALTER TABLE `documentation_steps` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
64
|
+
|
|
65
|
+
-- AlterTable
|
|
66
|
+
ALTER TABLE `event_handler_executions` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
67
|
+
|
|
68
|
+
-- AlterTable
|
|
69
|
+
ALTER TABLE `payment_installments` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
70
|
+
|
|
71
|
+
-- AlterTable
|
|
72
|
+
ALTER TABLE `payment_method_phase_documents` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
73
|
+
|
|
74
|
+
-- AlterTable
|
|
75
|
+
ALTER TABLE `payment_method_phase_fields` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
76
|
+
|
|
77
|
+
-- AlterTable
|
|
78
|
+
ALTER TABLE `payment_method_phase_steps` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
79
|
+
|
|
80
|
+
-- AlterTable
|
|
81
|
+
ALTER TABLE `payment_phases` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
82
|
+
|
|
83
|
+
-- AlterTable
|
|
84
|
+
ALTER TABLE `phase_event_attachments` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
85
|
+
|
|
86
|
+
-- AlterTable
|
|
87
|
+
ALTER TABLE `property_amenities` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
88
|
+
|
|
89
|
+
-- AlterTable
|
|
90
|
+
ALTER TABLE `property_documents` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
91
|
+
|
|
92
|
+
-- AlterTable
|
|
93
|
+
ALTER TABLE `property_media` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
94
|
+
|
|
95
|
+
-- AlterTable
|
|
96
|
+
ALTER TABLE `property_payment_method_links` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
97
|
+
|
|
98
|
+
-- AlterTable
|
|
99
|
+
ALTER TABLE `property_payment_method_phases` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
100
|
+
|
|
101
|
+
-- AlterTable
|
|
102
|
+
ALTER TABLE `property_units` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
103
|
+
|
|
104
|
+
-- AlterTable
|
|
105
|
+
ALTER TABLE `property_variant_amenities` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
106
|
+
|
|
107
|
+
-- AlterTable
|
|
108
|
+
ALTER TABLE `property_variant_media` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
109
|
+
|
|
110
|
+
-- AlterTable
|
|
111
|
+
ALTER TABLE `property_variants` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
112
|
+
|
|
113
|
+
-- AlterTable
|
|
114
|
+
ALTER TABLE `questionnaire_fields` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
115
|
+
|
|
116
|
+
-- AlterTable
|
|
117
|
+
ALTER TABLE `questionnaire_phases` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
118
|
+
|
|
119
|
+
-- AlterTable
|
|
120
|
+
ALTER TABLE `step_event_attachments` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
|
|
121
|
+
|
|
122
|
+
-- CreateTable
|
|
123
|
+
CREATE TABLE `workflow_blockers` (
|
|
124
|
+
`id` VARCHAR(191) NOT NULL,
|
|
125
|
+
`tenantId` VARCHAR(191) NOT NULL,
|
|
126
|
+
`applicationId` VARCHAR(191) NOT NULL,
|
|
127
|
+
`phaseId` VARCHAR(191) NULL,
|
|
128
|
+
`stepId` VARCHAR(191) NULL,
|
|
129
|
+
`blockerActor` ENUM('CUSTOMER', 'ADMIN', 'SYSTEM', 'EXTERNAL') NOT NULL,
|
|
130
|
+
`blockerCategory` ENUM('UPLOAD', 'RESUBMISSION', 'SIGNATURE', 'REVIEW', 'APPROVAL', 'PAYMENT', 'PROCESSING', 'EXTERNAL_CHECK', 'QUESTIONNAIRE') NOT NULL,
|
|
131
|
+
`urgency` ENUM('LOW', 'NORMAL', 'HIGH', 'CRITICAL') NOT NULL DEFAULT 'NORMAL',
|
|
132
|
+
`actionRequired` VARCHAR(500) NOT NULL,
|
|
133
|
+
`context` TEXT NULL,
|
|
134
|
+
`expectedByDate` DATETIME(3) NULL,
|
|
135
|
+
`isOverdue` BOOLEAN NOT NULL DEFAULT false,
|
|
136
|
+
`overdueAt` DATETIME(3) NULL,
|
|
137
|
+
`startedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
138
|
+
`resolvedAt` DATETIME(3) NULL,
|
|
139
|
+
`durationMs` INTEGER NULL,
|
|
140
|
+
`resolvedByActor` VARCHAR(191) NULL,
|
|
141
|
+
`resolutionTrigger` VARCHAR(191) NULL,
|
|
142
|
+
`reminderCount` INTEGER NOT NULL DEFAULT 0,
|
|
143
|
+
`lastReminderAt` DATETIME(3) NULL,
|
|
144
|
+
`nextReminderAt` DATETIME(3) NULL,
|
|
145
|
+
`metadata` JSON NULL,
|
|
146
|
+
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
147
|
+
`updatedAt` DATETIME(3) NOT NULL,
|
|
148
|
+
|
|
149
|
+
INDEX `workflow_blockers_tenantId_idx`(`tenantId`),
|
|
150
|
+
INDEX `workflow_blockers_applicationId_idx`(`applicationId`),
|
|
151
|
+
INDEX `workflow_blockers_phaseId_idx`(`phaseId`),
|
|
152
|
+
INDEX `workflow_blockers_stepId_idx`(`stepId`),
|
|
153
|
+
INDEX `workflow_blockers_blockerActor_idx`(`blockerActor`),
|
|
154
|
+
INDEX `workflow_blockers_blockerCategory_idx`(`blockerCategory`),
|
|
155
|
+
INDEX `workflow_blockers_urgency_idx`(`urgency`),
|
|
156
|
+
INDEX `workflow_blockers_isOverdue_idx`(`isOverdue`),
|
|
157
|
+
INDEX `workflow_blockers_startedAt_idx`(`startedAt`),
|
|
158
|
+
INDEX `workflow_blockers_resolvedAt_idx`(`resolvedAt`),
|
|
159
|
+
INDEX `workflow_blockers_tenantId_blockerActor_resolvedAt_idx`(`tenantId`, `blockerActor`, `resolvedAt`),
|
|
160
|
+
INDEX `workflow_blockers_tenantId_blockerCategory_resolvedAt_idx`(`tenantId`, `blockerCategory`, `resolvedAt`),
|
|
161
|
+
INDEX `workflow_blockers_tenantId_isOverdue_blockerActor_idx`(`tenantId`, `isOverdue`, `blockerActor`),
|
|
162
|
+
PRIMARY KEY (`id`)
|
|
163
|
+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
164
|
+
|
|
165
|
+
-- CreateIndex
|
|
166
|
+
CREATE INDEX `amenities_tenantId_idx` ON `amenities`(`tenantId`);
|
|
167
|
+
|
|
168
|
+
-- CreateIndex
|
|
169
|
+
CREATE UNIQUE INDEX `amenities_tenantId_name_key` ON `amenities`(`tenantId`, `name`);
|
|
170
|
+
|
|
171
|
+
-- CreateIndex
|
|
172
|
+
CREATE INDEX `application_documents_tenantId_idx` ON `application_documents`(`tenantId`);
|
|
173
|
+
|
|
174
|
+
-- CreateIndex
|
|
175
|
+
CREATE INDEX `application_events_tenantId_idx` ON `application_events`(`tenantId`);
|
|
176
|
+
|
|
177
|
+
-- CreateIndex
|
|
178
|
+
CREATE INDEX `application_payments_tenantId_idx` ON `application_payments`(`tenantId`);
|
|
179
|
+
|
|
180
|
+
-- CreateIndex
|
|
181
|
+
CREATE INDEX `application_phases_tenantId_idx` ON `application_phases`(`tenantId`);
|
|
182
|
+
|
|
183
|
+
-- CreateIndex
|
|
184
|
+
CREATE INDEX `documentation_phases_tenantId_idx` ON `documentation_phases`(`tenantId`);
|
|
185
|
+
|
|
186
|
+
-- CreateIndex
|
|
187
|
+
CREATE INDEX `documentation_step_approvals_tenantId_idx` ON `documentation_step_approvals`(`tenantId`);
|
|
188
|
+
|
|
189
|
+
-- CreateIndex
|
|
190
|
+
CREATE INDEX `documentation_step_documents_tenantId_idx` ON `documentation_step_documents`(`tenantId`);
|
|
191
|
+
|
|
192
|
+
-- CreateIndex
|
|
193
|
+
CREATE INDEX `documentation_steps_tenantId_idx` ON `documentation_steps`(`tenantId`);
|
|
194
|
+
|
|
195
|
+
-- CreateIndex
|
|
196
|
+
CREATE INDEX `event_handler_executions_tenantId_idx` ON `event_handler_executions`(`tenantId`);
|
|
197
|
+
|
|
198
|
+
-- CreateIndex
|
|
199
|
+
CREATE INDEX `payment_installments_tenantId_idx` ON `payment_installments`(`tenantId`);
|
|
200
|
+
|
|
201
|
+
-- CreateIndex
|
|
202
|
+
CREATE INDEX `payment_method_phase_documents_tenantId_idx` ON `payment_method_phase_documents`(`tenantId`);
|
|
203
|
+
|
|
204
|
+
-- CreateIndex
|
|
205
|
+
CREATE INDEX `payment_method_phase_fields_tenantId_idx` ON `payment_method_phase_fields`(`tenantId`);
|
|
206
|
+
|
|
207
|
+
-- CreateIndex
|
|
208
|
+
CREATE INDEX `payment_method_phase_steps_tenantId_idx` ON `payment_method_phase_steps`(`tenantId`);
|
|
209
|
+
|
|
210
|
+
-- CreateIndex
|
|
211
|
+
CREATE INDEX `payment_phases_tenantId_idx` ON `payment_phases`(`tenantId`);
|
|
212
|
+
|
|
213
|
+
-- CreateIndex
|
|
214
|
+
CREATE INDEX `phase_event_attachments_tenantId_idx` ON `phase_event_attachments`(`tenantId`);
|
|
215
|
+
|
|
216
|
+
-- CreateIndex
|
|
217
|
+
CREATE INDEX `property_amenities_tenantId_idx` ON `property_amenities`(`tenantId`);
|
|
218
|
+
|
|
219
|
+
-- CreateIndex
|
|
220
|
+
CREATE INDEX `property_documents_tenantId_idx` ON `property_documents`(`tenantId`);
|
|
221
|
+
|
|
222
|
+
-- CreateIndex
|
|
223
|
+
CREATE INDEX `property_media_tenantId_idx` ON `property_media`(`tenantId`);
|
|
224
|
+
|
|
225
|
+
-- CreateIndex
|
|
226
|
+
CREATE INDEX `property_payment_method_links_tenantId_idx` ON `property_payment_method_links`(`tenantId`);
|
|
227
|
+
|
|
228
|
+
-- CreateIndex
|
|
229
|
+
CREATE INDEX `property_payment_method_phases_tenantId_idx` ON `property_payment_method_phases`(`tenantId`);
|
|
230
|
+
|
|
231
|
+
-- CreateIndex
|
|
232
|
+
CREATE INDEX `property_units_tenantId_idx` ON `property_units`(`tenantId`);
|
|
233
|
+
|
|
234
|
+
-- CreateIndex
|
|
235
|
+
CREATE INDEX `property_variant_amenities_tenantId_idx` ON `property_variant_amenities`(`tenantId`);
|
|
236
|
+
|
|
237
|
+
-- CreateIndex
|
|
238
|
+
CREATE INDEX `property_variant_media_tenantId_idx` ON `property_variant_media`(`tenantId`);
|
|
239
|
+
|
|
240
|
+
-- CreateIndex
|
|
241
|
+
CREATE INDEX `property_variants_tenantId_idx` ON `property_variants`(`tenantId`);
|
|
242
|
+
|
|
243
|
+
-- CreateIndex
|
|
244
|
+
CREATE INDEX `questionnaire_fields_tenantId_idx` ON `questionnaire_fields`(`tenantId`);
|
|
245
|
+
|
|
246
|
+
-- CreateIndex
|
|
247
|
+
CREATE INDEX `questionnaire_phases_tenantId_idx` ON `questionnaire_phases`(`tenantId`);
|
|
248
|
+
|
|
249
|
+
-- CreateIndex
|
|
250
|
+
CREATE INDEX `step_event_attachments_tenantId_idx` ON `step_event_attachments`(`tenantId`);
|
|
251
|
+
|
|
252
|
+
-- AddForeignKey
|
|
253
|
+
ALTER TABLE `property_media` ADD CONSTRAINT `property_media_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
254
|
+
|
|
255
|
+
-- AddForeignKey
|
|
256
|
+
ALTER TABLE `property_documents` ADD CONSTRAINT `property_documents_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
257
|
+
|
|
258
|
+
-- AddForeignKey
|
|
259
|
+
ALTER TABLE `amenities` ADD CONSTRAINT `amenities_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
260
|
+
|
|
261
|
+
-- AddForeignKey
|
|
262
|
+
ALTER TABLE `property_variants` ADD CONSTRAINT `property_variants_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
263
|
+
|
|
264
|
+
-- AddForeignKey
|
|
265
|
+
ALTER TABLE `property_variant_amenities` ADD CONSTRAINT `property_variant_amenities_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
266
|
+
|
|
267
|
+
-- AddForeignKey
|
|
268
|
+
ALTER TABLE `property_variant_media` ADD CONSTRAINT `property_variant_media_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
269
|
+
|
|
270
|
+
-- AddForeignKey
|
|
271
|
+
ALTER TABLE `property_units` ADD CONSTRAINT `property_units_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
272
|
+
|
|
273
|
+
-- AddForeignKey
|
|
274
|
+
ALTER TABLE `property_amenities` ADD CONSTRAINT `property_amenities_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
275
|
+
|
|
276
|
+
-- AddForeignKey
|
|
277
|
+
ALTER TABLE `property_payment_method_links` ADD CONSTRAINT `property_payment_method_links_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
278
|
+
|
|
279
|
+
-- AddForeignKey
|
|
280
|
+
ALTER TABLE `property_payment_method_phases` ADD CONSTRAINT `property_payment_method_phases_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
281
|
+
|
|
282
|
+
-- AddForeignKey
|
|
283
|
+
ALTER TABLE `phase_event_attachments` ADD CONSTRAINT `phase_event_attachments_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
284
|
+
|
|
285
|
+
-- AddForeignKey
|
|
286
|
+
ALTER TABLE `payment_method_phase_steps` ADD CONSTRAINT `payment_method_phase_steps_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
287
|
+
|
|
288
|
+
-- AddForeignKey
|
|
289
|
+
ALTER TABLE `step_event_attachments` ADD CONSTRAINT `step_event_attachments_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
290
|
+
|
|
291
|
+
-- AddForeignKey
|
|
292
|
+
ALTER TABLE `payment_method_phase_documents` ADD CONSTRAINT `payment_method_phase_documents_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
293
|
+
|
|
294
|
+
-- AddForeignKey
|
|
295
|
+
ALTER TABLE `payment_method_phase_fields` ADD CONSTRAINT `payment_method_phase_fields_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
296
|
+
|
|
297
|
+
-- AddForeignKey
|
|
298
|
+
ALTER TABLE `application_phases` ADD CONSTRAINT `application_phases_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
299
|
+
|
|
300
|
+
-- AddForeignKey
|
|
301
|
+
ALTER TABLE `questionnaire_phases` ADD CONSTRAINT `questionnaire_phases_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
302
|
+
|
|
303
|
+
-- AddForeignKey
|
|
304
|
+
ALTER TABLE `documentation_phases` ADD CONSTRAINT `documentation_phases_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
305
|
+
|
|
306
|
+
-- AddForeignKey
|
|
307
|
+
ALTER TABLE `payment_phases` ADD CONSTRAINT `payment_phases_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
308
|
+
|
|
309
|
+
-- AddForeignKey
|
|
310
|
+
ALTER TABLE `questionnaire_fields` ADD CONSTRAINT `questionnaire_fields_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
311
|
+
|
|
312
|
+
-- AddForeignKey
|
|
313
|
+
ALTER TABLE `application_events` ADD CONSTRAINT `application_events_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
314
|
+
|
|
315
|
+
-- AddForeignKey
|
|
316
|
+
ALTER TABLE `documentation_steps` ADD CONSTRAINT `documentation_steps_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
317
|
+
|
|
318
|
+
-- AddForeignKey
|
|
319
|
+
ALTER TABLE `documentation_step_documents` ADD CONSTRAINT `documentation_step_documents_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
320
|
+
|
|
321
|
+
-- AddForeignKey
|
|
322
|
+
ALTER TABLE `documentation_step_approvals` ADD CONSTRAINT `documentation_step_approvals_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
323
|
+
|
|
324
|
+
-- AddForeignKey
|
|
325
|
+
ALTER TABLE `payment_installments` ADD CONSTRAINT `payment_installments_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
326
|
+
|
|
327
|
+
-- AddForeignKey
|
|
328
|
+
ALTER TABLE `application_payments` ADD CONSTRAINT `application_payments_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
329
|
+
|
|
330
|
+
-- AddForeignKey
|
|
331
|
+
ALTER TABLE `application_documents` ADD CONSTRAINT `application_documents_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
332
|
+
|
|
333
|
+
-- AddForeignKey
|
|
334
|
+
ALTER TABLE `event_handler_executions` ADD CONSTRAINT `event_handler_executions_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|