teableio/teable

View on GitHub
packages/db-main-prisma/prisma/postgres/migrations/20240626072754_add_setting_table/migration.sql

Summary

Maintainability
Test Coverage
-- CreateTable
CREATE TABLE "setting" (
    "instance_id" TEXT NOT NULL,
    "disallow_sign_up" BOOLEAN,
    "disallow_space_creation" BOOLEAN,

    CONSTRAINT "setting_pkey" PRIMARY KEY ("instance_id")
);

CREATE EXTENSION IF NOT EXISTS pgcrypto;

-- Insert initial record
INSERT INTO "setting" ("instance_id", "disallow_sign_up", "disallow_space_creation") VALUES (gen_random_uuid(), NULL, NULL);