diff --git a/supabase/migrations/20250522033859_update_leaflets_in_pubs_on_doc_delete.sql b/supabase/migrations/20250522033859_update_leaflets_in_pubs_on_doc_delete.sql new file mode 100644 index 00000000..05c32289 --- /dev/null +++ b/supabase/migrations/20250522033859_update_leaflets_in_pubs_on_doc_delete.sql @@ -0,0 +1,3 @@ +alter table "public"."leaflets_in_publications" drop constraint "leaflets_in_publications_doc_fkey"; +alter table "public"."leaflets_in_publications" add constraint "leaflets_in_publications_doc_fkey" FOREIGN KEY (doc) REFERENCES documents(uri) ON DELETE SET NULL not valid; +alter table "public"."leaflets_in_publications" validate constraint "leaflets_in_publications_doc_fkey";