Status defaults

This commit is contained in:
Pacien Boisson
2021-02-10 20:19:21 +04:00
committed by Hammad Jutt
parent 231ba8d479
commit 40118f6d75

View File

@@ -33,8 +33,8 @@ CREATE TABLE "public"."quest" (
"description" text,
"external_link" text,
"cooldown" integer,
"status" text NOT NULL,
"repetition" text NOT NULL,
"status" text NOT NULL DEFAULT 'OPEN',
"repetition" text NOT NULL DEFAULT 'ONCE',
PRIMARY KEY ("id") ,
FOREIGN KEY ("created_by_player_id") REFERENCES "public"."player"("id") ON UPDATE restrict ON DELETE restrict,
FOREIGN KEY ("guild_id") REFERENCES "public"."guild"("id") ON UPDATE restrict ON DELETE restrict,
@@ -56,7 +56,7 @@ CREATE TABLE "public"."quest_completion"(
"submitted_at" date NOT NULL DEFAULT now(),
"submission_text" text,
"submission_link" text,
"status" text NOT NULL,
"status" text NOT NULL DEFAULT 'PENDING',
PRIMARY KEY ("quest_id","completed_by_player_id") ,
FOREIGN KEY ("quest_id") REFERENCES "public"."quest"("id") ON UPDATE restrict ON DELETE restrict,
FOREIGN KEY ("completed_by_player_id") REFERENCES "public"."player"("id") ON UPDATE restrict ON DELETE restrict,