@dynamatix/gb-schemas 2.0.45 → 2.0.47
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/entities/applicants/applicant-share-holding.entity.d.ts +18 -0
- package/dist/entities/applicants/applicant-share-holding.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-share-holding.entity.js +5 -0
- package/dist/entities/applications/application-company.entity.d.ts +52 -4
- package/dist/entities/applications/application-company.entity.d.ts.map +1 -1
- package/dist/entities/applications/application-company.entity.js +10 -0
- package/dist/entities/applications/index.d.ts +2 -3
- package/dist/entities/applications/index.d.ts.map +1 -1
- package/dist/entities/applications/index.js +0 -1
- package/dist/entities/users/role-group.entity.d.ts +1 -0
- package/dist/entities/users/role-group.entity.d.ts.map +1 -1
- package/dist/entities/users/role.entity.d.ts +2 -0
- package/dist/entities/users/role.entity.d.ts.map +1 -1
- package/dist/entities/users/user.entity.d.ts +2 -0
- package/dist/entities/users/user.entity.d.ts.map +1 -1
- package/entities/applicants/applicant-share-holding.entity.ts +23 -0
- package/entities/applications/application-company.entity.ts +64 -5
- package/entities/applications/index.ts +0 -3
- package/entities/users/role-group.entity.ts +1 -0
- package/entities/users/role.entity.ts +2 -0
- package/entities/users/user.entity.ts +2 -0
- package/package.json +1 -1
- package/prisma/applicants/applicant-share-holding.prisma +17 -0
- package/prisma/applications/application-company.prisma +50 -7
- package/prisma/applications/application.prisma +0 -1
- package/prisma/migrations/20250513143530_update_credit_card_commitment_schema/migration.sql +8 -8
- package/prisma/migrations/20250513170654_update_mortgage_commitment_schema/migration.sql +89 -89
- package/prisma/migrations/20250513183558_update_loan_commitment_schema/migration.sql +33 -33
- package/prisma/migrations/20250513184341_update_loan_commitment_schema/migration.sql +4 -4
- package/prisma/migrations/20250513202307_update_role_schema/migration.sql +12 -12
- package/prisma/migrations/20250514062536_update_role_group_schema/migration.sql +12 -12
- package/prisma/migrations/20250514064054_update_user_schema/migration.sql +12 -12
- package/prisma/migrations/20250514071524_update_user_schema/migration.sql +15 -15
- package/prisma/migrations/20250514072729_update_user_schema/migration.sql +18 -18
- package/prisma/migrations/20250514102042_update_user_rolegroup_role_schemas/migration.sql +9 -0
- package/prisma/migrations/20250514183537_update_application_company_schema/migration.sql +100 -0
- package/prisma/schema.prisma +83 -97
- package/prisma/shared/lookup.prisma +4 -5
- package/prisma/users/role-group.prisma +1 -0
- package/prisma/users/role.prisma +7 -6
- package/prisma/users/user.prisma +3 -1
- package/dist/entities/applications/company.entity.d.ts +0 -77
- package/dist/entities/applications/company.entity.d.ts.map +0 -1
- package/dist/entities/applications/company.entity.js +0 -23
- package/entities/applications/company.entity.ts +0 -102
- package/prisma/applications/company.prisma +0 -76
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- You are about to drop the column `accountInArrears` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
5
|
-
- You are about to drop the column `accountInArrearsDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
6
|
-
- You are about to drop the column `accountUptoDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
7
|
-
- You are about to drop the column `accountUptoDateFailDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
8
|
-
- You are about to drop the column `commitment_type_lid` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
9
|
-
- You are about to drop the column `doHaveSharedResponsibility` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
10
|
-
- You are about to drop the column `fixedTerm` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
11
|
-
- You are about to drop the column `furtherAdvanceDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
12
|
-
- You are about to drop the column `furtherAdvances` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
13
|
-
- You are about to drop the column `joint_names` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
14
|
-
- You are about to drop the column `originalLoanAmount` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
15
|
-
- You are about to drop the column `sharedMortgage` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
16
|
-
- You are about to drop the column `startDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
17
|
-
- You are about to alter the column `property_value` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
18
|
-
- You are about to alter the column `outstanding_balance` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
19
|
-
- You are about to alter the column `monthly_payment` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
20
|
-
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_mortgage_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
-- DropForeignKey
|
|
24
|
-
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_commitment_type_lid_fkey";
|
|
25
|
-
|
|
26
|
-
-- DropForeignKey
|
|
27
|
-
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey";
|
|
28
|
-
|
|
29
|
-
-- AlterTable
|
|
30
|
-
ALTER TABLE "applicant_mortgage_commitments" DROP COLUMN "accountInArrears",
|
|
31
|
-
DROP COLUMN "accountInArrearsDetails",
|
|
32
|
-
DROP COLUMN "accountUptoDate",
|
|
33
|
-
DROP COLUMN "accountUptoDateFailDetails",
|
|
34
|
-
DROP COLUMN "commitment_type_lid",
|
|
35
|
-
DROP COLUMN "doHaveSharedResponsibility",
|
|
36
|
-
DROP COLUMN "fixedTerm",
|
|
37
|
-
DROP COLUMN "furtherAdvanceDetails",
|
|
38
|
-
DROP COLUMN "furtherAdvances",
|
|
39
|
-
DROP COLUMN "joint_names",
|
|
40
|
-
DROP COLUMN "originalLoanAmount",
|
|
41
|
-
DROP COLUMN "sharedMortgage",
|
|
42
|
-
DROP COLUMN "startDate",
|
|
43
|
-
ADD COLUMN "account_in_arrears" BOOLEAN,
|
|
44
|
-
ADD COLUMN "account_in_arrears_details" TEXT,
|
|
45
|
-
ADD COLUMN "account_upto_date" BOOLEAN,
|
|
46
|
-
ADD COLUMN "account_upto_date_fail_details" TEXT,
|
|
47
|
-
ADD COLUMN "charge_type_lid" TEXT,
|
|
48
|
-
ADD COLUMN "do_have_shared_responsibility" BOOLEAN,
|
|
49
|
-
ADD COLUMN "finance_home_type_lid" TEXT,
|
|
50
|
-
ADD COLUMN "finance_type_hpp_lid" TEXT,
|
|
51
|
-
ADD COLUMN "fixed_term" TEXT,
|
|
52
|
-
ADD COLUMN "further_advance_details" TEXT,
|
|
53
|
-
ADD COLUMN "further_advances" BOOLEAN,
|
|
54
|
-
ADD COLUMN "hpp_repayment_type_lid" TEXT,
|
|
55
|
-
ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
|
|
56
|
-
ADD COLUMN "mortgage_hpp_rationale" TEXT DEFAULT '',
|
|
57
|
-
ADD COLUMN "mortgage_rate" DOUBLE PRECISION,
|
|
58
|
-
ADD COLUMN "original_loan_amount" DECIMAL(10,2),
|
|
59
|
-
ADD COLUMN "purpose" TEXT,
|
|
60
|
-
ADD COLUMN "remaining_term" TEXT,
|
|
61
|
-
ADD COLUMN "remaining_term_month" INTEGER,
|
|
62
|
-
ADD COLUMN "security_details" TEXT,
|
|
63
|
-
ADD COLUMN "shared_mortgage" TEXT,
|
|
64
|
-
ADD COLUMN "source" TEXT DEFAULT 'Broker',
|
|
65
|
-
ADD COLUMN "start_date" TEXT,
|
|
66
|
-
ALTER COLUMN "lender_name" DROP NOT NULL,
|
|
67
|
-
ALTER COLUMN "property_value" DROP NOT NULL,
|
|
68
|
-
ALTER COLUMN "property_value" SET DATA TYPE DECIMAL(10,2),
|
|
69
|
-
ALTER COLUMN "repayment_type_lid" DROP NOT NULL,
|
|
70
|
-
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
71
|
-
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
72
|
-
|
|
73
|
-
-- CreateIndex
|
|
74
|
-
CREATE UNIQUE INDEX "applicant_mortgage_commitments_commitment_id_key" ON "applicant_mortgage_commitments"("commitment_id");
|
|
75
|
-
|
|
76
|
-
-- AddForeignKey
|
|
77
|
-
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey" FOREIGN KEY ("repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
78
|
-
|
|
79
|
-
-- AddForeignKey
|
|
80
|
-
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_type_hpp_lid_fkey" FOREIGN KEY ("finance_type_hpp_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
81
|
-
|
|
82
|
-
-- AddForeignKey
|
|
83
|
-
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_hpp_repayment_type_lid_fkey" FOREIGN KEY ("hpp_repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
84
|
-
|
|
85
|
-
-- AddForeignKey
|
|
86
|
-
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_home_type_lid_fkey" FOREIGN KEY ("finance_home_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
87
|
-
|
|
88
|
-
-- AddForeignKey
|
|
89
|
-
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_charge_type_lid_fkey" FOREIGN KEY ("charge_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `accountInArrears` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `accountInArrearsDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the column `accountUptoDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
7
|
+
- You are about to drop the column `accountUptoDateFailDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
8
|
+
- You are about to drop the column `commitment_type_lid` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
9
|
+
- You are about to drop the column `doHaveSharedResponsibility` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
10
|
+
- You are about to drop the column `fixedTerm` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
11
|
+
- You are about to drop the column `furtherAdvanceDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
12
|
+
- You are about to drop the column `furtherAdvances` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
13
|
+
- You are about to drop the column `joint_names` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
14
|
+
- You are about to drop the column `originalLoanAmount` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
15
|
+
- You are about to drop the column `sharedMortgage` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
16
|
+
- You are about to drop the column `startDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
17
|
+
- You are about to alter the column `property_value` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
18
|
+
- You are about to alter the column `outstanding_balance` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
19
|
+
- You are about to alter the column `monthly_payment` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
20
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_mortgage_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
-- DropForeignKey
|
|
24
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_commitment_type_lid_fkey";
|
|
25
|
+
|
|
26
|
+
-- DropForeignKey
|
|
27
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey";
|
|
28
|
+
|
|
29
|
+
-- AlterTable
|
|
30
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP COLUMN "accountInArrears",
|
|
31
|
+
DROP COLUMN "accountInArrearsDetails",
|
|
32
|
+
DROP COLUMN "accountUptoDate",
|
|
33
|
+
DROP COLUMN "accountUptoDateFailDetails",
|
|
34
|
+
DROP COLUMN "commitment_type_lid",
|
|
35
|
+
DROP COLUMN "doHaveSharedResponsibility",
|
|
36
|
+
DROP COLUMN "fixedTerm",
|
|
37
|
+
DROP COLUMN "furtherAdvanceDetails",
|
|
38
|
+
DROP COLUMN "furtherAdvances",
|
|
39
|
+
DROP COLUMN "joint_names",
|
|
40
|
+
DROP COLUMN "originalLoanAmount",
|
|
41
|
+
DROP COLUMN "sharedMortgage",
|
|
42
|
+
DROP COLUMN "startDate",
|
|
43
|
+
ADD COLUMN "account_in_arrears" BOOLEAN,
|
|
44
|
+
ADD COLUMN "account_in_arrears_details" TEXT,
|
|
45
|
+
ADD COLUMN "account_upto_date" BOOLEAN,
|
|
46
|
+
ADD COLUMN "account_upto_date_fail_details" TEXT,
|
|
47
|
+
ADD COLUMN "charge_type_lid" TEXT,
|
|
48
|
+
ADD COLUMN "do_have_shared_responsibility" BOOLEAN,
|
|
49
|
+
ADD COLUMN "finance_home_type_lid" TEXT,
|
|
50
|
+
ADD COLUMN "finance_type_hpp_lid" TEXT,
|
|
51
|
+
ADD COLUMN "fixed_term" TEXT,
|
|
52
|
+
ADD COLUMN "further_advance_details" TEXT,
|
|
53
|
+
ADD COLUMN "further_advances" BOOLEAN,
|
|
54
|
+
ADD COLUMN "hpp_repayment_type_lid" TEXT,
|
|
55
|
+
ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
|
|
56
|
+
ADD COLUMN "mortgage_hpp_rationale" TEXT DEFAULT '',
|
|
57
|
+
ADD COLUMN "mortgage_rate" DOUBLE PRECISION,
|
|
58
|
+
ADD COLUMN "original_loan_amount" DECIMAL(10,2),
|
|
59
|
+
ADD COLUMN "purpose" TEXT,
|
|
60
|
+
ADD COLUMN "remaining_term" TEXT,
|
|
61
|
+
ADD COLUMN "remaining_term_month" INTEGER,
|
|
62
|
+
ADD COLUMN "security_details" TEXT,
|
|
63
|
+
ADD COLUMN "shared_mortgage" TEXT,
|
|
64
|
+
ADD COLUMN "source" TEXT DEFAULT 'Broker',
|
|
65
|
+
ADD COLUMN "start_date" TEXT,
|
|
66
|
+
ALTER COLUMN "lender_name" DROP NOT NULL,
|
|
67
|
+
ALTER COLUMN "property_value" DROP NOT NULL,
|
|
68
|
+
ALTER COLUMN "property_value" SET DATA TYPE DECIMAL(10,2),
|
|
69
|
+
ALTER COLUMN "repayment_type_lid" DROP NOT NULL,
|
|
70
|
+
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
71
|
+
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
72
|
+
|
|
73
|
+
-- CreateIndex
|
|
74
|
+
CREATE UNIQUE INDEX "applicant_mortgage_commitments_commitment_id_key" ON "applicant_mortgage_commitments"("commitment_id");
|
|
75
|
+
|
|
76
|
+
-- AddForeignKey
|
|
77
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey" FOREIGN KEY ("repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
78
|
+
|
|
79
|
+
-- AddForeignKey
|
|
80
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_type_hpp_lid_fkey" FOREIGN KEY ("finance_type_hpp_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
81
|
+
|
|
82
|
+
-- AddForeignKey
|
|
83
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_hpp_repayment_type_lid_fkey" FOREIGN KEY ("hpp_repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
84
|
+
|
|
85
|
+
-- AddForeignKey
|
|
86
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_home_type_lid_fkey" FOREIGN KEY ("finance_home_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
87
|
+
|
|
88
|
+
-- AddForeignKey
|
|
89
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_charge_type_lid_fkey" FOREIGN KEY ("charge_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- You are about to drop the column `commitment_type_lid` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
5
|
-
- You are about to drop the column `joint_names` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
6
|
-
- You are about to alter the column `outstanding_balance` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
7
|
-
- You are about to alter the column `monthly_payment` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
8
|
-
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_loan_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
9
|
-
- Made the column `purpose` on table `applicant_loan_commitments` required. This step will fail if there are existing NULL values in that column.
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
-- DropForeignKey
|
|
13
|
-
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_commitment_type_lid_fkey";
|
|
14
|
-
|
|
15
|
-
-- DropForeignKey
|
|
16
|
-
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey";
|
|
17
|
-
|
|
18
|
-
-- AlterTable
|
|
19
|
-
ALTER TABLE "applicant_loan_commitments" DROP COLUMN "commitment_type_lid",
|
|
20
|
-
DROP COLUMN "joint_names",
|
|
21
|
-
ALTER COLUMN "loan_type_lid" DROP NOT NULL,
|
|
22
|
-
ALTER COLUMN "security_details" DROP NOT NULL,
|
|
23
|
-
ALTER COLUMN "purpose" SET NOT NULL,
|
|
24
|
-
ALTER COLUMN "do_have_shared_responsibility" DROP NOT NULL,
|
|
25
|
-
ALTER COLUMN "shared_mortgage" DROP NOT NULL,
|
|
26
|
-
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
27
|
-
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
28
|
-
|
|
29
|
-
-- CreateIndex
|
|
30
|
-
CREATE UNIQUE INDEX "applicant_loan_commitments_commitment_id_key" ON "applicant_loan_commitments"("commitment_id");
|
|
31
|
-
|
|
32
|
-
-- AddForeignKey
|
|
33
|
-
ALTER TABLE "applicant_loan_commitments" ADD CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey" FOREIGN KEY ("loan_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `commitment_type_lid` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `joint_names` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to alter the column `outstanding_balance` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
7
|
+
- You are about to alter the column `monthly_payment` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
8
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_loan_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
9
|
+
- Made the column `purpose` on table `applicant_loan_commitments` required. This step will fail if there are existing NULL values in that column.
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
-- DropForeignKey
|
|
13
|
+
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_commitment_type_lid_fkey";
|
|
14
|
+
|
|
15
|
+
-- DropForeignKey
|
|
16
|
+
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey";
|
|
17
|
+
|
|
18
|
+
-- AlterTable
|
|
19
|
+
ALTER TABLE "applicant_loan_commitments" DROP COLUMN "commitment_type_lid",
|
|
20
|
+
DROP COLUMN "joint_names",
|
|
21
|
+
ALTER COLUMN "loan_type_lid" DROP NOT NULL,
|
|
22
|
+
ALTER COLUMN "security_details" DROP NOT NULL,
|
|
23
|
+
ALTER COLUMN "purpose" SET NOT NULL,
|
|
24
|
+
ALTER COLUMN "do_have_shared_responsibility" DROP NOT NULL,
|
|
25
|
+
ALTER COLUMN "shared_mortgage" DROP NOT NULL,
|
|
26
|
+
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
27
|
+
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
28
|
+
|
|
29
|
+
-- CreateIndex
|
|
30
|
+
CREATE UNIQUE INDEX "applicant_loan_commitments_commitment_id_key" ON "applicant_loan_commitments"("commitment_id");
|
|
31
|
+
|
|
32
|
+
-- AddForeignKey
|
|
33
|
+
ALTER TABLE "applicant_loan_commitments" ADD CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey" FOREIGN KEY ("loan_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
-- AlterTable
|
|
2
|
-
ALTER TABLE "applicant_loan_commitments" ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
|
|
3
|
-
ADD COLUMN "loan_rationale" TEXT DEFAULT '',
|
|
4
|
-
ADD COLUMN "source" TEXT DEFAULT 'Broker';
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "applicant_loan_commitments" ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
|
|
3
|
+
ADD COLUMN "loan_rationale" TEXT DEFAULT '',
|
|
4
|
+
ADD COLUMN "source" TEXT DEFAULT 'Broker';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- Changed the type of `role_id` on the `roles` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
-- AlterTable
|
|
8
|
-
ALTER TABLE "roles" DROP COLUMN "role_id",
|
|
9
|
-
ADD COLUMN "role_id" INTEGER NOT NULL;
|
|
10
|
-
|
|
11
|
-
-- CreateIndex
|
|
12
|
-
CREATE UNIQUE INDEX "roles_role_id_key" ON "roles"("role_id");
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `role_id` on the `roles` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "roles" DROP COLUMN "role_id",
|
|
9
|
+
ADD COLUMN "role_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "roles_role_id_key" ON "roles"("role_id");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- Changed the type of `group_id` on the `role_groups` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
-- AlterTable
|
|
8
|
-
ALTER TABLE "role_groups" DROP COLUMN "group_id",
|
|
9
|
-
ADD COLUMN "group_id" INTEGER NOT NULL;
|
|
10
|
-
|
|
11
|
-
-- CreateIndex
|
|
12
|
-
CREATE UNIQUE INDEX "role_groups_group_id_key" ON "role_groups"("group_id");
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `group_id` on the `role_groups` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "role_groups" DROP COLUMN "group_id",
|
|
9
|
+
ADD COLUMN "group_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "role_groups_group_id_key" ON "role_groups"("group_id");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- Changed the type of `account_id` on the `users` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
-- AlterTable
|
|
8
|
-
ALTER TABLE "users" DROP COLUMN "account_id",
|
|
9
|
-
ADD COLUMN "account_id" INTEGER NOT NULL;
|
|
10
|
-
|
|
11
|
-
-- CreateIndex
|
|
12
|
-
CREATE UNIQUE INDEX "users_account_id_key" ON "users"("account_id");
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `account_id` on the `users` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "users" DROP COLUMN "account_id",
|
|
9
|
+
ADD COLUMN "account_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "users_account_id_key" ON "users"("account_id");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- You are about to drop the column `password` on the `users` table. All the data in the column will be lost.
|
|
5
|
-
- You are about to drop the `claims` table. If the table is not empty, all the data it contains will be lost.
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
-- DropForeignKey
|
|
9
|
-
ALTER TABLE "claims" DROP CONSTRAINT "claims_user_id_fkey";
|
|
10
|
-
|
|
11
|
-
-- AlterTable
|
|
12
|
-
ALTER TABLE "users" DROP COLUMN "password";
|
|
13
|
-
|
|
14
|
-
-- DropTable
|
|
15
|
-
DROP TABLE "claims";
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `password` on the `users` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the `claims` table. If the table is not empty, all the data it contains will be lost.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- DropForeignKey
|
|
9
|
+
ALTER TABLE "claims" DROP CONSTRAINT "claims_user_id_fkey";
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "users" DROP COLUMN "password";
|
|
13
|
+
|
|
14
|
+
-- DropTable
|
|
15
|
+
DROP TABLE "claims";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- The `modified_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
-
- The `created_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
6
|
-
- The `deleted_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
7
|
-
- Changed the type of `status` on the `users` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
-- AlterTable
|
|
11
|
-
ALTER TABLE "users" DROP COLUMN "status",
|
|
12
|
-
ADD COLUMN "status" INTEGER NOT NULL,
|
|
13
|
-
DROP COLUMN "modified_by_id",
|
|
14
|
-
ADD COLUMN "modified_by_id" INTEGER,
|
|
15
|
-
DROP COLUMN "created_by_id",
|
|
16
|
-
ADD COLUMN "created_by_id" INTEGER,
|
|
17
|
-
DROP COLUMN "deleted_by_id",
|
|
18
|
-
ADD COLUMN "deleted_by_id" INTEGER;
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `modified_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
- The `created_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
6
|
+
- The `deleted_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
7
|
+
- Changed the type of `status` on the `users` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "users" DROP COLUMN "status",
|
|
12
|
+
ADD COLUMN "status" INTEGER NOT NULL,
|
|
13
|
+
DROP COLUMN "modified_by_id",
|
|
14
|
+
ADD COLUMN "modified_by_id" INTEGER,
|
|
15
|
+
DROP COLUMN "created_by_id",
|
|
16
|
+
ADD COLUMN "created_by_id" INTEGER,
|
|
17
|
+
DROP COLUMN "deleted_by_id",
|
|
18
|
+
ADD COLUMN "deleted_by_id" INTEGER;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `name` on the `application_companies` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `registration_number` on the `application_companies` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the `companies` table. If the table is not empty, all the data it contains will be lost.
|
|
7
|
+
- A unique constraint covering the columns `[company_id]` on the table `applicant_shareholdings` will be added. If there are existing duplicate values, this will fail.
|
|
8
|
+
- Added the required column `address_country_lid` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
9
|
+
- Added the required column `address_line1` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
10
|
+
- Added the required column `business_type_lid` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
11
|
+
- Added the required column `registered_name` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
12
|
+
- Added the required column `registered_number` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
13
|
+
- Added the required column `tax_jurisdiction_lid` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
14
|
+
- Added the required column `trading_since` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
15
|
+
- Added the required column `year_end` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
16
|
+
- Added the required column `year_end1` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
17
|
+
- Added the required column `year_end2` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
18
|
+
- Added the required column `year_end3` to the `application_companies` table without a default value. This is not possible if the table is not empty.
|
|
19
|
+
|
|
20
|
+
*/
|
|
21
|
+
-- DropForeignKey
|
|
22
|
+
ALTER TABLE "applicant_shareholdings" DROP CONSTRAINT "applicant_shareholdings_company_id_fkey";
|
|
23
|
+
|
|
24
|
+
-- DropForeignKey
|
|
25
|
+
ALTER TABLE "companies" DROP CONSTRAINT "companies_address_country_lid_fkey";
|
|
26
|
+
|
|
27
|
+
-- DropForeignKey
|
|
28
|
+
ALTER TABLE "companies" DROP CONSTRAINT "companies_application_id_fkey";
|
|
29
|
+
|
|
30
|
+
-- DropForeignKey
|
|
31
|
+
ALTER TABLE "companies" DROP CONSTRAINT "companies_application_type_lid_fkey";
|
|
32
|
+
|
|
33
|
+
-- DropForeignKey
|
|
34
|
+
ALTER TABLE "companies" DROP CONSTRAINT "companies_business_type_lid_fkey";
|
|
35
|
+
|
|
36
|
+
-- DropForeignKey
|
|
37
|
+
ALTER TABLE "companies" DROP CONSTRAINT "companies_tax_jurisdiction_lid_fkey";
|
|
38
|
+
|
|
39
|
+
-- AlterTable
|
|
40
|
+
ALTER TABLE "application_companies" DROP COLUMN "name",
|
|
41
|
+
DROP COLUMN "registration_number",
|
|
42
|
+
ADD COLUMN "address_city" TEXT,
|
|
43
|
+
ADD COLUMN "address_country_lid" TEXT NOT NULL,
|
|
44
|
+
ADD COLUMN "address_line1" TEXT NOT NULL,
|
|
45
|
+
ADD COLUMN "address_line2" TEXT,
|
|
46
|
+
ADD COLUMN "address_line3" TEXT,
|
|
47
|
+
ADD COLUMN "address_post_code" TEXT NOT NULL DEFAULT '',
|
|
48
|
+
ADD COLUMN "business_type_lid" TEXT NOT NULL,
|
|
49
|
+
ADD COLUMN "company_any_voluntary_enforced_possession_no" BOOLEAN NOT NULL DEFAULT true,
|
|
50
|
+
ADD COLUMN "company_any_voluntary_enforced_possession_yes" BOOLEAN NOT NULL DEFAULT false,
|
|
51
|
+
ADD COLUMN "company_bankruptcy" TEXT NOT NULL DEFAULT '',
|
|
52
|
+
ADD COLUMN "company_bankruptcy_no" BOOLEAN NOT NULL DEFAULT true,
|
|
53
|
+
ADD COLUMN "company_bankruptcy_yes" BOOLEAN NOT NULL DEFAULT false,
|
|
54
|
+
ADD COLUMN "company_ccj_in_last_three_year_no" BOOLEAN NOT NULL DEFAULT true,
|
|
55
|
+
ADD COLUMN "company_ccj_in_last_three_year_yes" BOOLEAN NOT NULL DEFAULT false,
|
|
56
|
+
ADD COLUMN "company_county_court_judgment" TEXT NOT NULL DEFAULT '',
|
|
57
|
+
ADD COLUMN "company_credit_defaults" TEXT NOT NULL DEFAULT '',
|
|
58
|
+
ADD COLUMN "company_defaults_in_last_year_no" BOOLEAN NOT NULL DEFAULT true,
|
|
59
|
+
ADD COLUMN "company_defaults_in_last_year_yes" BOOLEAN NOT NULL DEFAULT false,
|
|
60
|
+
ADD COLUMN "company_secured_arrears" TEXT NOT NULL DEFAULT '',
|
|
61
|
+
ADD COLUMN "company_unsecured_arrears" TEXT NOT NULL DEFAULT '',
|
|
62
|
+
ADD COLUMN "date_of_incorporation" TEXT,
|
|
63
|
+
ADD COLUMN "do_you_know_registered_number" BOOLEAN NOT NULL DEFAULT true,
|
|
64
|
+
ADD COLUMN "epc" TEXT NOT NULL DEFAULT '',
|
|
65
|
+
ADD COLUMN "nature_of_business" TEXT NOT NULL DEFAULT '',
|
|
66
|
+
ADD COLUMN "net_profit_year1" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
67
|
+
ADD COLUMN "net_profit_year2" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
68
|
+
ADD COLUMN "net_profit_year3" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
69
|
+
ADD COLUMN "page_valid_flag" BOOLEAN DEFAULT true,
|
|
70
|
+
ADD COLUMN "registered_name" TEXT NOT NULL,
|
|
71
|
+
ADD COLUMN "registered_number" INTEGER NOT NULL,
|
|
72
|
+
ADD COLUMN "remaining_lease" TEXT NOT NULL DEFAULT '',
|
|
73
|
+
ADD COLUMN "sic_codes" TEXT[],
|
|
74
|
+
ADD COLUMN "tax_jurisdiction_lid" TEXT NOT NULL,
|
|
75
|
+
ADD COLUMN "trading_since" TEXT NOT NULL,
|
|
76
|
+
ADD COLUMN "turnover_year1" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
77
|
+
ADD COLUMN "turnover_year2" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
78
|
+
ADD COLUMN "turnover_year3" DECIMAL(65,30) NOT NULL DEFAULT 0.00,
|
|
79
|
+
ADD COLUMN "year_end" TEXT NOT NULL,
|
|
80
|
+
ADD COLUMN "year_end1" INTEGER NOT NULL,
|
|
81
|
+
ADD COLUMN "year_end2" INTEGER NOT NULL,
|
|
82
|
+
ADD COLUMN "year_end3" INTEGER NOT NULL;
|
|
83
|
+
|
|
84
|
+
-- DropTable
|
|
85
|
+
DROP TABLE "companies";
|
|
86
|
+
|
|
87
|
+
-- CreateIndex
|
|
88
|
+
CREATE UNIQUE INDEX "applicant_shareholdings_company_id_key" ON "applicant_shareholdings"("company_id");
|
|
89
|
+
|
|
90
|
+
-- AddForeignKey
|
|
91
|
+
ALTER TABLE "applicant_shareholdings" ADD CONSTRAINT "applicant_shareholdings_company_id_fkey" FOREIGN KEY ("company_id") REFERENCES "application_companies"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
92
|
+
|
|
93
|
+
-- AddForeignKey
|
|
94
|
+
ALTER TABLE "application_companies" ADD CONSTRAINT "application_companies_business_type_lid_fkey" FOREIGN KEY ("business_type_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
95
|
+
|
|
96
|
+
-- AddForeignKey
|
|
97
|
+
ALTER TABLE "application_companies" ADD CONSTRAINT "application_companies_tax_jurisdiction_lid_fkey" FOREIGN KEY ("tax_jurisdiction_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
98
|
+
|
|
99
|
+
-- AddForeignKey
|
|
100
|
+
ALTER TABLE "application_companies" ADD CONSTRAINT "application_companies_address_country_lid_fkey" FOREIGN KEY ("address_country_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|