From d85851c9793062ec7528bd4df22122c0292d1a8e Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sun, 10 May 2026 12:30:18 +0000 Subject: [PATCH] chore(prisma): add missing migration for notebook hierarchy and trash --- .../migration.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 memento-note/prisma/migrations/20260510123000_add_notebook_hierarchy_and_trash/migration.sql diff --git a/memento-note/prisma/migrations/20260510123000_add_notebook_hierarchy_and_trash/migration.sql b/memento-note/prisma/migrations/20260510123000_add_notebook_hierarchy_and_trash/migration.sql new file mode 100644 index 0000000..ced0154 --- /dev/null +++ b/memento-note/prisma/migrations/20260510123000_add_notebook_hierarchy_and_trash/migration.sql @@ -0,0 +1,18 @@ +-- AlterTable +ALTER TABLE "Label" ADD COLUMN "type" TEXT NOT NULL DEFAULT 'user'; + +-- AlterTable +ALTER TABLE "UserAISettings" ADD COLUMN "autoSave" BOOLEAN NOT NULL DEFAULT true; + +-- AlterTable +ALTER TABLE "Notebook" ADD COLUMN "parentId" TEXT, +ADD COLUMN "trashedAt" TIMESTAMP(3); + +-- CreateIndex +CREATE INDEX "Notebook_parentId_idx" ON "Notebook"("parentId"); + +-- CreateIndex +CREATE INDEX "Notebook_trashedAt_idx" ON "Notebook"("trashedAt"); + +-- AddForeignKey +ALTER TABLE "Notebook" ADD CONSTRAINT "Notebook_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Notebook"("id") ON DELETE CASCADE ON UPDATE CASCADE;