diff options
author | Duncan Parkes <duncan@fury.ukcod.org.uk> | 2011-02-18 19:08:22 +0000 |
---|---|---|
committer | Duncan Parkes <duncan@fury.ukcod.org.uk> | 2011-02-18 19:08:22 +0000 |
commit | 835dce8861e9a6c9dcbbf21bf2f29aa16d9fcdb4 (patch) | |
tree | 488145aa486a326599155e3281efd9ad4a791d92 /db | |
parent | 9cd9904b058abdb6a17e919594439a8cc7a509a7 (diff) |
Add postcode to the title of the feed.
At the moment, it's in whatever format it arrives, and lower case.
Diffstat (limited to 'db')
-rw-r--r-- | db/alert_types.sql | 22 | ||||
-rw-r--r-- | db/alert_types_eha.sql | 11 |
2 files changed, 33 insertions, 0 deletions
diff --git a/db/alert_types.sql b/db/alert_types.sql index 82a8c71f8..fb1aac1d0 100644 --- a/db/alert_types.sql +++ b/db/alert_types.sql @@ -53,6 +53,28 @@ values ('local_problems_state', '', '', 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (?)', 'created desc', '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby'); +-- New problems around a postcode +insert into alert_type +(ref, head_sql_query, head_table, + head_title, head_link, head_description, + item_table, item_where, item_order, + item_title, item_link, item_description, template) +values ('postcode_local_problems', '', '', + 'New problems near {{POSTCODE}} on FixMyStreet', '/', 'The latest local problems reported by users', + 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (''confirmed'', ''fixed'')', 'created desc', + '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby'); + +-- New problems around a postcode with a particular state +insert into alert_type +(ref, head_sql_query, head_table, + head_title, head_link, head_description, + item_table, item_where, item_order, + item_title, item_link, item_description, template) +values ('postcode_local_problems_state', '', '', + 'New problems NEAR {{POSTCODE}} on FixMyStreet', '/', 'The latest local problems reported by users', + 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (?)', 'created desc', + '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby'); + -- New problems sent to a particular council insert into alert_type (ref, head_sql_query, head_table, diff --git a/db/alert_types_eha.sql b/db/alert_types_eha.sql index c949ea2f8..17f44fcd9 100644 --- a/db/alert_types_eha.sql +++ b/db/alert_types_eha.sql @@ -42,6 +42,17 @@ values ('local_problems', '', '', 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (''confirmed'', ''fixed'')', 'created desc', '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby'); +-- New problems around a postcode +insert into alert_type +(ref, head_sql_query, head_table, + head_title, head_link, head_description, + item_table, item_where, item_order, + item_title, item_link, item_description, template) +values ('postcode_local_problems', '', '', + 'New reports on reportemptyhomes.com near {{POSTCODE}}', '/', 'The latest local reports reported by users', + 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (''confirmed'', ''fixed'')', 'created desc', + '{{title}}, {{confirmed}}', '/report/{{id}}', '{{detail}}', 'alert-problem-nearby'); + -- New problems sent to a particular council insert into alert_type (ref, head_sql_query, head_table, |