From d1867408b13e48a94512db9072ed7fd978536704 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 5 Feb 2013 10:30:25 +0000 Subject: New schema to bring alert_type up to date with what it says it is. --- db/schema_0035-update_alert_types_for_bodies.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/schema_0035-update_alert_types_for_bodies.sql (limited to 'db') diff --git a/db/schema_0035-update_alert_types_for_bodies.sql b/db/schema_0035-update_alert_types_for_bodies.sql new file mode 100644 index 000000000..d7f1be475 --- /dev/null +++ b/db/schema_0035-update_alert_types_for_bodies.sql @@ -0,0 +1,19 @@ +BEGIN; + + UPDATE alert_type set item_where = 'problem.non_public = ''f'' and problem.state in + (''confirmed'', ''investigating'', ''planned'', ''in progress'', + ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' ) AND + (bodies_str like ''%''||?||''%'' or bodies_str is null) and + areas like ''%,''||?||'',%''' WHERE ref = 'council_problems'; + + UPDATE alert_type set item_where = 'problem.non_public = ''f'' and problem.state in + (''confirmed'', ''investigating'', ''planned'', ''in progress'', + ''fixed'', ''fixed - council'', ''fixed - user'', ''closed'', + ''action scheduled'', ''not responsible'', ''duplicate'', ''unable to fix'', + ''internal referral'' ) AND + (bodies_str like ''%''||?||''%'' or bodies_str is null) and + areas like ''%,''||?||'',%''' WHERE ref = 'ward_problems'; + +COMMIT; -- cgit v1.2.3