Compare commits

..

2 Commits

Author SHA1 Message Date
b172b5839c fix(db): add missing MS21 user auth fields migration
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
deactivated_at, is_local_auth, password_hash, invited_by,
invitation_token, and invited_at were added to schema.prisma
but never captured in a migration, causing P2022 errors on
any fresh database deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 22:09:58 -06:00
55340dc661 fix(infra): install pgvector + uuid-ossp extensions in mosaic-db-init (#665)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-03-03 03:55:25 +00:00

View File

@@ -0,0 +1,13 @@
-- MS21: Add admin, local auth, and invitation fields to users table
-- These columns were added to schema.prisma but never captured in a migration.
ALTER TABLE "users"
ADD COLUMN IF NOT EXISTS "deactivated_at" TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS "is_local_auth" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN IF NOT EXISTS "password_hash" TEXT,
ADD COLUMN IF NOT EXISTS "invited_by" UUID,
ADD COLUMN IF NOT EXISTS "invitation_token" TEXT,
ADD COLUMN IF NOT EXISTS "invited_at" TIMESTAMPTZ;
-- CreateIndex
CREATE UNIQUE INDEX IF NOT EXISTS "users_invitation_token_key" ON "users"("invitation_token");