From f40daca135bfaa31f3d74a25c889978d45512516 Mon Sep 17 00:00:00 2001 From: dominicwest Date: Fri, 29 Mar 2024 11:01:12 +0000 Subject: [PATCH] GAP-2531: Cascade delete grant export tables createdby column --- .../V1_98__cascade_delete_export_rows.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/resources/db/migration/V1_98__cascade_delete_export_rows.sql diff --git a/src/main/resources/db/migration/V1_98__cascade_delete_export_rows.sql b/src/main/resources/db/migration/V1_98__cascade_delete_export_rows.sql new file mode 100644 index 00000000..7924f6f6 --- /dev/null +++ b/src/main/resources/db/migration/V1_98__cascade_delete_export_rows.sql @@ -0,0 +1,15 @@ +alter table public.grant_export +drop constraint grant_export_created_by_fkey, +add constraint grant_export_created_by_fkey + foreign key (created_by) + references public.grant_admin (grant_admin_id) match simple + on delete cascade + on update no action; + +alter table public.grant_export_batch +drop constraint grant_export_batch_created_by_fkey, +add constraint grant_export_batch_created_by_fkey + foreign key (created_by) + references public.grant_admin (grant_admin_id) match simple + on delete cascade + on update no action; \ No newline at end of file