aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-04 09:41:20 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-04 09:41:20 +0000
commitf2738efc228b865be4d3e8f16e5728d952183543 (patch)
tree333c006f8b99a3da7ae8f3d9a5d31982fc44acdb /db
parent93872dc4bc17c4fc246f16bdde744ed5b1851839 (diff)
Update schema migration to work after previous merged in one.
Diffstat (limited to 'db')
-rw-r--r--db/schema_0025-add_more_statuses_to_problem.sql14
1 files changed, 7 insertions, 7 deletions
diff --git a/db/schema_0025-add_more_statuses_to_problem.sql b/db/schema_0025-add_more_statuses_to_problem.sql
index 14d1b3195..f450bd8a9 100644
--- a/db/schema_0025-add_more_statuses_to_problem.sql
+++ b/db/schema_0025-add_more_statuses_to_problem.sql
@@ -40,40 +40,40 @@ BEGIN;
or problem_state = 'internal referral'
);
- UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and problem.state in
+ UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and 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'')'
WHERE ref = 'postcode_local_problems';
- UPDATE alert_type set item_where = 'problem.state in
+ 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'' )'
WHERE ref = 'new_problems';
- UPDATE alert_type set item_where = 'problem.state in (''fixed'', ''fixed - user'', ''fixed - council'')' WHERE ref = 'new_fixed_problems';
- UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and problem.state in
+ UPDATE alert_type set item_where = 'problem.non_public = ''f'' and problem.state in (''fixed'', ''fixed - user'', ''fixed - council'')' WHERE ref = 'new_fixed_problems';
+ UPDATE alert_type set item_where = 'nearby.problem_id = problem.id and 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'')'
WHERE ref = 'local_problems';
- UPDATE alert_type set item_where = 'problem.state in
+ 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
(council like ''%''||?||''%'' or council is null) and
areas like ''%,''||?||'',%''' WHERE ref = 'council_problems';
- UPDATE alert_type set item_where = 'problem.state in
+ 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
(council like ''%''||?||''%'' or council is null) and
areas like ''%,''||?||'',%''' WHERE ref = 'ward_problems';
- UPDATE alert_type set item_where = 'problem.state in
+ 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'',