diff --git a/hasura/migrations/1612970700332_quests/up.sql b/hasura/migrations/1612970700332_quests/up.sql index 8a6a2fd2..f653f69f 100644 --- a/hasura/migrations/1612970700332_quests/up.sql +++ b/hasura/migrations/1612970700332_quests/up.sql @@ -51,13 +51,14 @@ CREATE TABLE "public"."quest_skill"( ); CREATE TABLE "public"."quest_completion"( + "id" uuid NOT NULL DEFAULT gen_random_uuid(), "quest_id" uuid NOT NULL, "completed_by_player_id" uuid NOT NULL, "submitted_at" timestamptz NOT NULL DEFAULT now(), "submission_text" text, "submission_link" text, "status" text NOT NULL DEFAULT 'PENDING', - PRIMARY KEY ("quest_id","completed_by_player_id") , + PRIMARY KEY ("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, FOREIGN KEY ("status") REFERENCES "public"."QuestCompletionStatus"("status") ON UPDATE restrict ON DELETE restrict