From 6f90d2dfcb5ee7e6e5f2e83fffdf01a2bd6161e4 Mon Sep 17 00:00:00 2001 From: Morgan Ludtke Date: Tue, 12 Mar 2024 19:14:58 -0500 Subject: [PATCH 1/2] fix: move map layer initialization in migration --- api/prisma/migrations/01_change_to_prisma/migration.sql | 2 -- api/prisma/migrations/02_doorway_to_prisma/migration.sql | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 api/prisma/migrations/02_doorway_to_prisma/migration.sql diff --git a/api/prisma/migrations/01_change_to_prisma/migration.sql b/api/prisma/migrations/01_change_to_prisma/migration.sql index 7d0177e121..95fccbfcbe 100644 --- a/api/prisma/migrations/01_change_to_prisma/migration.sql +++ b/api/prisma/migrations/01_change_to_prisma/migration.sql @@ -1691,5 +1691,3 @@ SET NOT NULL; ALTER TABLE "paper_applications" ALTER COLUMN "language" SET NOT NULL; - -ALTER TABLE "map_layers" RENAME CONSTRAINT "PK_d1bcb10041ba88ffea330dc10d9" TO "map_layers_pkey"; diff --git a/api/prisma/migrations/02_doorway_to_prisma/migration.sql b/api/prisma/migrations/02_doorway_to_prisma/migration.sql new file mode 100644 index 0000000000..17efb499f5 --- /dev/null +++ b/api/prisma/migrations/02_doorway_to_prisma/migration.sql @@ -0,0 +1,7 @@ +CREATE TABLE "map_layers" ( + "id" UUID NOT NULL DEFAULT uuid_generate_v4(), + "name" TEXT NOT NULL, + "jurisdiction_id" TEXT NOT NULL, + "feature_collection" JSONB NOT NULL DEFAULT '{}', + CONSTRAINT "map_layers_pkey" PRIMARY KEY ("id") +); From ea222d831c33203e06ee33b12d18485f43c994c8 Mon Sep 17 00:00:00 2001 From: Morgan Ludtke Date: Tue, 12 Mar 2024 19:26:42 -0500 Subject: [PATCH 2/2] fix: missed file --- api/prisma/migrations/00_init/migration.sql | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/prisma/migrations/00_init/migration.sql b/api/prisma/migrations/00_init/migration.sql index 72cc6335ee..d846fafbbd 100644 --- a/api/prisma/migrations/00_init/migration.sql +++ b/api/prisma/migrations/00_init/migration.sql @@ -697,14 +697,6 @@ CREATE TABLE "user_roles" ( CONSTRAINT "PK_87b8888186ca9769c960e926870" PRIMARY KEY ("user_id") ); -CREATE TABLE "map_layers" ( - "id" UUID NOT NULL DEFAULT uuid_generate_v4(), - "name" TEXT NOT NULL, - "jurisdiction_id" TEXT NOT NULL, - "feature_collection" JSONB NOT NULL DEFAULT '{}', - CONSTRAINT "PK_d1bcb10041ba88ffea330dc10d9" PRIMARY KEY ("id") -); - -- CreateIndex CREATE UNIQUE INDEX "REL_5eb038a51b9cd6872359a687b1" ON "alternate_contact"("mailing_address_id");