feat: customer branch citizen
This commit is contained in:
parent
b12babdc09
commit
a0168ee4fb
4 changed files with 254 additions and 0 deletions
39
prisma/migrations/20240917034817_add_relation/migration.sql
Normal file
39
prisma/migrations/20240917034817_add_relation/migration.sql
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `customerBranchId` to the `CustomerBranchCitizen` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `customerBranchId` to the `CustomerBranchCommercialRegis` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `customerBranchId` to the `CustomerBranchHouseRegis` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `customerBranchId` to the `CustomerBranchPoa` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `customerBranchId` to the `CustomerBranchVatRegis` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranchCitizen" ADD COLUMN "customerBranchId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranchCommercialRegis" ADD COLUMN "customerBranchId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranchHouseRegis" ADD COLUMN "customerBranchId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranchPoa" ADD COLUMN "customerBranchId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranchVatRegis" ADD COLUMN "customerBranchId" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranchCitizen" ADD CONSTRAINT "CustomerBranchCitizen_customerBranchId_fkey" FOREIGN KEY ("customerBranchId") REFERENCES "CustomerBranch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranchPoa" ADD CONSTRAINT "CustomerBranchPoa_customerBranchId_fkey" FOREIGN KEY ("customerBranchId") REFERENCES "CustomerBranch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranchHouseRegis" ADD CONSTRAINT "CustomerBranchHouseRegis_customerBranchId_fkey" FOREIGN KEY ("customerBranchId") REFERENCES "CustomerBranch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranchCommercialRegis" ADD CONSTRAINT "CustomerBranchCommercialRegis_customerBranchId_fkey" FOREIGN KEY ("customerBranchId") REFERENCES "CustomerBranch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranchVatRegis" ADD CONSTRAINT "CustomerBranchVatRegis_customerBranchId_fkey" FOREIGN KEY ("customerBranchId") REFERENCES "CustomerBranch"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue