From 549ef0295fee4ac41220477c7537ddf7ca791263 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 23 Aug 2022 01:00:01 -0700 Subject: [PATCH] Remove EXISTS causing migration failure. --- db/postgresql/migrations/04_remove_casade_delete/migration.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/postgresql/migrations/04_remove_casade_delete/migration.sql b/db/postgresql/migrations/04_remove_casade_delete/migration.sql index d0995938a1..aa1f7805c1 100644 --- a/db/postgresql/migrations/04_remove_casade_delete/migration.sql +++ b/db/postgresql/migrations/04_remove_casade_delete/migration.sql @@ -17,7 +17,7 @@ ALTER TABLE "session" DROP CONSTRAINT IF EXISTS "session_website_id_fkey"; ALTER TABLE "website" DROP CONSTRAINT IF EXISTS "website_user_id_fkey"; -- AddForeignKey -ALTER TABLE "event" ADD CONSTRAINT EXISTS "event_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "session"("session_id") ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE "event" ADD CONSTRAINT "event_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "session"("session_id") ON DELETE RESTRICT ON UPDATE CASCADE; -- AddForeignKey ALTER TABLE "event" ADD CONSTRAINT "event_website_id_fkey" FOREIGN KEY ("website_id") REFERENCES "website"("website_id") ON DELETE RESTRICT ON UPDATE CASCADE;