mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-19 23:41:51 +03:00
f4340da478
Co-authored-by: LongYinan <lynweklm@gmail.com>
14 lines
491 B
SQL
14 lines
491 B
SQL
-- CreateTable
|
|
CREATE TABLE "user_feature_gates" (
|
|
"id" VARCHAR NOT NULL,
|
|
"user_id" VARCHAR NOT NULL,
|
|
"feature" VARCHAR NOT NULL,
|
|
"reason" VARCHAR NOT NULL,
|
|
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
CONSTRAINT "user_feature_gates_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "user_feature_gates" ADD CONSTRAINT "user_feature_gates_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|