feat: add relation for agent
This commit is contained in:
parent
a412aef7ac
commit
e76292fe38
4 changed files with 62 additions and 11 deletions
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `agent` on the `CustomerBranch` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "CustomerBranch" DROP COLUMN "agent",
|
||||
ADD COLUMN "agentUserId" TEXT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ProductGroup" ADD COLUMN "shared" BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CustomerBranch" ADD CONSTRAINT "CustomerBranch_agentUserId_fkey" FOREIGN KEY ("agentUserId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue