fix(db): add missing MS21 user auth fields migration (#666)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #666.
This commit is contained in:
@@ -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");
|
||||
Reference in New Issue
Block a user