File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
packages/db/prisma/migrations/20251029161715_add_share_dashboard Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ -- CreateTable
2+ CREATE TABLE "shares_dashboards " (
3+ " id" TEXT NOT NULL ,
4+ " dashboardId" TEXT NOT NULL ,
5+ " organizationId" TEXT NOT NULL ,
6+ " public" BOOLEAN NOT NULL DEFAULT false,
7+ " password" TEXT ,
8+ " createdAt" TIMESTAMP (3 ) NOT NULL DEFAULT CURRENT_TIMESTAMP ,
9+ " updatedAt" TIMESTAMP (3 ) NOT NULL DEFAULT CURRENT_TIMESTAMP
10+ );
11+
12+ -- CreateIndex
13+ CREATE UNIQUE INDEX "shares_dashboards_id_key " ON " shares_dashboards" (" id" );
14+
15+ -- CreateIndex
16+ CREATE UNIQUE INDEX "shares_dashboards_dashboardId_key " ON " shares_dashboards" (" dashboardId" );
17+
18+ -- AddForeignKey
19+ ALTER TABLE " shares_dashboards" ADD CONSTRAINT " shares_dashboards_dashboardId_fkey" FOREIGN KEY (" dashboardId" ) REFERENCES " dashboards" (" id" ) ON DELETE CASCADE ON UPDATE CASCADE;
20+
21+ -- AddForeignKey
22+ ALTER TABLE " shares_dashboards" ADD CONSTRAINT " shares_dashboards_organizationId_fkey" FOREIGN KEY (" organizationId" ) REFERENCES " organizations" (" id" ) ON DELETE CASCADE ON UPDATE CASCADE;
You can’t perform that action at this time.
0 commit comments