mirror of
https://github.com/documenso/documenso.git
synced 2026-08-24 07:12:23 +10:00
feat: add qr signatures
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "AnonymousVerificationTokenType" AS ENUM ('PASSKEY', 'QR_SIGNATURE');
|
||||
|
||||
-- AlterTable: add "type" as nullable, backfill existing rows (all are passkey
|
||||
-- challenges today), then enforce NOT NULL.
|
||||
ALTER TABLE "AnonymousVerificationToken" ADD COLUMN "type" "AnonymousVerificationTokenType";
|
||||
|
||||
UPDATE "AnonymousVerificationToken" SET "type" = 'PASSKEY';
|
||||
|
||||
ALTER TABLE "AnonymousVerificationToken" ALTER COLUMN "type" SET NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "AnonymousVerificationToken" ADD COLUMN "value" TEXT;
|
||||
|
||||
ALTER TABLE "AnonymousVerificationToken" ADD COLUMN "metadata" JSONB;
|
||||
@@ -0,0 +1,10 @@
|
||||
-- AlterTable: add with DEFAULT false so every existing row is backfilled to
|
||||
-- disabled, then flip the column default to true so new rows are enabled.
|
||||
ALTER TABLE "DocumentMeta" ADD COLUMN "qrSignatureEnabled" BOOLEAN NOT NULL DEFAULT false;
|
||||
ALTER TABLE "DocumentMeta" ALTER COLUMN "qrSignatureEnabled" SET DEFAULT true;
|
||||
|
||||
ALTER TABLE "OrganisationGlobalSettings" ADD COLUMN "qrSignatureEnabled" BOOLEAN NOT NULL DEFAULT false;
|
||||
ALTER TABLE "OrganisationGlobalSettings" ALTER COLUMN "qrSignatureEnabled" SET DEFAULT true;
|
||||
|
||||
-- Existing teams stay NULL (inherit from organisation).
|
||||
ALTER TABLE "TeamGlobalSettings" ADD COLUMN "qrSignatureEnabled" BOOLEAN;
|
||||
Reference in New Issue
Block a user