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