16 lines
618 B
SQL
16 lines
618 B
SQL
-- CreateEnum
|
|
CREATE TYPE "SignupMode" AS ENUM ('OPEN', 'APPROVED', 'CONFIRMED', 'CLOSED');
|
|
|
|
-- CreateTable
|
|
-- Single-row settings table; the app always reads/writes the row at id
|
|
-- 'singleton'. No row is created here -- absence of a row means "use
|
|
-- defaults" (see getSignupMode in lib/settings.ts), so sites upgrading
|
|
-- into this migration keep today's OPEN behavior without a backfill.
|
|
CREATE TABLE "SiteSettings" (
|
|
"id" TEXT NOT NULL DEFAULT 'singleton',
|
|
"signupMode" "SignupMode" NOT NULL DEFAULT 'OPEN',
|
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
|
|
CONSTRAINT "SiteSettings_pkey" PRIMARY KEY ("id")
|
|
);
|