wip share

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-01-14 08:59:25 +01:00
parent 13bd16b207
commit f880b9a697
19 changed files with 1577 additions and 399 deletions

View File

@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "public"."share_widgets" (
"id" TEXT NOT NULL,
"projectId" TEXT NOT NULL,
"organizationId" TEXT NOT NULL,
"public" BOOLEAN NOT NULL DEFAULT true,
"options" JSONB NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- CreateIndex
CREATE UNIQUE INDEX "share_widgets_id_key" ON "public"."share_widgets"("id");
-- AddForeignKey
ALTER TABLE "public"."share_widgets" ADD CONSTRAINT "share_widgets_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "public"."share_widgets" ADD CONSTRAINT "share_widgets_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "public"."organizations"("id") ON DELETE CASCADE ON UPDATE CASCADE;