From cfd302dc1dd1b151a0a1aeacf094bff5c4e2bffb Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 19 Dec 2024 17:58:18 -0500 Subject: [PATCH] Fixing duped trigger. --- .../db_schema/replaceable_schema/triggers.sql | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/crates/db_schema/replaceable_schema/triggers.sql b/crates/db_schema/replaceable_schema/triggers.sql index a6e7dcce7..df86f11e5 100644 --- a/crates/db_schema/replaceable_schema/triggers.sql +++ b/crates/db_schema/replaceable_schema/triggers.sql @@ -761,35 +761,3 @@ CALL r.create_person_saved_combined_trigger ('post'); CALL r.create_person_saved_combined_trigger ('comment'); --- Combined tables triggers --- These insert (published, item_id) into X_combined tables --- Reports (comment_report, post_report, private_message_report) -CREATE PROCEDURE r.create_report_combined_trigger (table_name text) -LANGUAGE plpgsql -AS $a$ -BEGIN - EXECUTE replace($b$ CREATE FUNCTION r.report_combined_thing_insert ( ) - RETURNS TRIGGER - LANGUAGE plpgsql - AS $$ - BEGIN - INSERT INTO report_combined (published, thing_id) - VALUES (NEW.published, NEW.id); - RETURN NEW; - END $$; - CREATE TRIGGER report_combined - AFTER INSERT ON thing - FOR EACH ROW - EXECUTE FUNCTION r.report_combined_thing_insert ( ); - $b$, - 'thing', - table_name); -END; -$a$; - -CALL r.create_report_combined_trigger ('post_report'); - -CALL r.create_report_combined_trigger ('comment_report'); - -CALL r.create_report_combined_trigger ('private_message_report'); -