Update migrations file as there was a conflict with previous

This commit is contained in:
Jackson Harper
2023-01-11 10:57:21 +08:00
parent 2ad517ba69
commit 9d8f51f866
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,10 @@
-- Type: DO
-- Name: remove_constraints_from_content_display_reports
-- Description: Remove constraints from CD reports as they should not be deleted
BEGIN;
ALTER TABLE omnivore.content_display_report DROP CONSTRAINT content_display_report_page_id_fkey;
ALTER TABLE omnivore.content_display_report DROP CONSTRAINT content_display_report_user_id_fkey;
COMMIT;

View File

@ -0,0 +1,13 @@
-- Type: UNDO
-- Name: remove_constraints_from_content_display_reports
-- Description: Remove constraints from CD reports as they should not be deleted
BEGIN;
ALTER TABLE omnivore.content_display_report
ADD CONSTRAINT content_display_report_user_id_fkey FOREIGN KEY (user_id) REFERENCES omnivore."user"(id);
ALTER TABLE omnivore.content_display_report
ADD CONSTRAINT content_display_report_page_id_fkey FOREIGN KEY (page_id) REFERENCES omnivore.pages(id);
COMMIT;