We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f46598f commit 902cc48Copy full SHA for 902cc48
packages/db/prisma/migrations/20251129063148_change_chat_created_by_to_optional/migration.sql
@@ -1,5 +1,5 @@
1
--- AlterTable
+-- First, remove the NOT NULL constraint on the createdById column.
2
ALTER TABLE "Chat" ALTER COLUMN "createdById" DROP NOT NULL;
3
4
--- Set all chats created by the guest user (id: 1) to have a NULL createdById.
+-- Then, set all chats created by the guest user (id: 1) to have a NULL createdById.
5
UPDATE "Chat" SET "createdById" = NULL WHERE "createdById" = '1';
0 commit comments