mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-20 06:51:41 +03:00
14 lines
491 B
MySQL
14 lines
491 B
MySQL
|
-- 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;
|