aboutsummaryrefslogtreecommitdiff
path: root/prisma/migrations/04_team_redesign
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-24 13:09:50 +0000
committerFuwn <[email protected]>2026-01-24 13:09:50 +0000
commit396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b (patch)
treeb9df4ca6a70db45cfffbae6fdd7252e20fb8e93c /prisma/migrations/04_team_redesign
downloadumami-main.tar.xz
umami-main.zip
Initial commitHEADmain
Created from https://vercel.com/new
Diffstat (limited to 'prisma/migrations/04_team_redesign')
-rw-r--r--prisma/migrations/04_team_redesign/migration.sql29
1 files changed, 29 insertions, 0 deletions
diff --git a/prisma/migrations/04_team_redesign/migration.sql b/prisma/migrations/04_team_redesign/migration.sql
new file mode 100644
index 0000000..9172631
--- /dev/null
+++ b/prisma/migrations/04_team_redesign/migration.sql
@@ -0,0 +1,29 @@
+/*
+ Warnings:
+
+ - You are about to drop the `team_website` table. If the table is not empty, all the data it contains will be lost.
+
+*/
+-- AlterTable
+ALTER TABLE "team" ADD COLUMN "deleted_at" TIMESTAMPTZ(6),
+ADD COLUMN "logo_url" VARCHAR(2183);
+
+-- AlterTable
+ALTER TABLE "user" ADD COLUMN "display_name" VARCHAR(255),
+ADD COLUMN "logo_url" VARCHAR(2183);
+
+-- AlterTable
+ALTER TABLE "website" ADD COLUMN "created_by" UUID,
+ADD COLUMN "team_id" UUID;
+
+-- MigrateData
+UPDATE "website" SET created_by = user_id WHERE team_id IS NULL;
+
+-- DropTable
+DROP TABLE "team_website";
+
+-- CreateIndex
+CREATE INDEX "website_team_id_idx" ON "website"("team_id");
+
+-- CreateIndex
+CREATE INDEX "website_created_by_idx" ON "website"("created_by"); \ No newline at end of file