chore: consolidate migrations

This commit is contained in:
vidvidvid
2022-01-30 19:17:57 +01:00
committed by Scott Stevenson
parent 5fddba61be
commit 2ef107d80a
9 changed files with 2 additions and 9 deletions

View File

@@ -1 +0,0 @@
DROP TABLE "public"."quest_role";

View File

@@ -1 +1 @@
CREATE TABLE "public"."quest_role"("quest_id" UUID NOT NULL, "role" text NOT NULL, "rank" integer NOT NULL, PRIMARY KEY ("quest_id","role") , FOREIGN KEY ("quest_id") REFERENCES "public"."quest"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("role") REFERENCES "public"."PlayerRole"("role") ON UPDATE restrict ON DELETE restrict, UNIQUE ("quest_id"));
CREATE TABLE "public"."quest_role"("quest_id" UUID NOT NULL, "role" text NOT NULL, "rank" integer, PRIMARY KEY ("quest_id","role") , FOREIGN KEY ("quest_id") REFERENCES "public"."quest"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("role") REFERENCES "public"."PlayerRole"("role") ON UPDATE restrict ON DELETE restrict, UNIQUE ("quest_id"));

View File

@@ -1 +0,0 @@
alter table "public"."quest_role" add constraint "quest_role_quest_id_key" unique ("quest_id");

View File

@@ -1 +0,0 @@
ALTER TABLE "public"."PlayerRole" DROP COLUMN "isBasic";

View File

@@ -1 +1 @@
ALTER TABLE "public"."PlayerRole" ADD COLUMN "isBasic" boolean NULL DEFAULT true;
ALTER TABLE "public"."PlayerRole" ADD COLUMN "basic" boolean NULL DEFAULT true;

View File

@@ -1 +0,0 @@
ALTER TABLE "public"."quest_role" ALTER COLUMN "rank" SET NOT NULL;

View File

@@ -1 +0,0 @@
ALTER TABLE "public"."quest_role" ALTER COLUMN "rank" DROP NOT NULL;

View File

@@ -1 +0,0 @@
alter table "public"."PlayerRole" rename column "basic" to "isBasic";

View File

@@ -1 +0,0 @@
alter table "public"."PlayerRole" rename column "isBasic" to "basic";