diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-05 10:30:25 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-05 10:30:25 +0000 |
commit | d1867408b13e48a94512db9072ed7fd978536704 (patch) | |
tree | 5d310c32a1247856d0fa0d27a6acb37393d55ac4 /db | |
parent | 6e387850c170743ce2ba61a890e34bc9ad8ff3b8 (diff) |
New schema to bring alert_type up to date with what it says it is.
Diffstat (limited to 'db')
-rw-r--r-- | db/schema_0035-update_alert_types_for_bodies.sql | 19 |
1 files changed, 19 insertions, 0 deletions
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; |