diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-05-29 15:57:41 +0100 |
commit | 67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (patch) | |
tree | 38b8570647124df06c637d4b923f6010211ef328 /db | |
parent | 40b3a51d33caefa8f5fb97ce9be18ef936c7e260 (diff) | |
parent | 131ff6e9bf3626d6a8fff6ae54669d250148a63a (diff) |
Merge remote branch 'origin/master' into fmb-read-only
Conflicts:
bin/send-reports
perllib/FixMyStreet/Cobrand/Default.pm
perllib/FixMyStreet/Cobrand/FixMyStreet.pm
templates/web/fixmystreet/alert/index.html
templates/web/fixmystreet/around/display_location.html
web/cobrands/fixmystreet/_layout.scss
web/js/map-OpenLayers.js
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 16 | ||||
-rw-r--r-- | db/schema_0013-add_external_id_to_comment.sql | 6 | ||||
-rw-r--r-- | db/schema_0015-add_extra_to_comment.sql | 6 | ||||
-rw-r--r-- | db/schema_0016-add_whensent_and_send_fail_to_comment.sql | 11 | ||||
-rw-r--r-- | db/schema_0017-add_send_comments_to_open311conf.sql | 6 | ||||
-rw-r--r-- | db/schema_0018-add_comment_user_to_open311conf.sql | 6 | ||||
-rw-r--r-- | db/schema_0019-add_title_to_users.sql | 8 | ||||
-rw-r--r-- | db/schema_0020-add_suppress_alerts_to_open311.sql | 6 |
8 files changed, 62 insertions, 3 deletions
diff --git a/db/schema.sql b/db/schema.sql index e1205099d..832104991 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -135,7 +135,8 @@ create table users ( phone text, password text not null default '', from_council integer, -- id of council user is from or null/0 if not - flagged boolean not null default 'f' + flagged boolean not null default 'f', + title text ); -- Problems reported by users of site @@ -311,9 +312,15 @@ create table comment ( or problem_state = 'fixed' or problem_state = 'fixed - council' or problem_state = 'fixed - user' - ) + ), -- other fields? one to indicate whether this was written by the council -- and should be highlighted in the display? + external_id text, + extra text, + send_fail_count integer not null default 0, + send_fail_reason text, + send_fail_timestamp timestamp, + whensent timestamp ); create index comment_user_id_idx on comment(user_id); @@ -428,5 +435,8 @@ create table open311conf ( endpoint text not null, jurisdiction text, api_key text, - send_method text + send_method text, + send_comments boolean not null default 'f', + comment_user_id int references users(id), + suppress_alerts boolean not null default 'f' ); diff --git a/db/schema_0013-add_external_id_to_comment.sql b/db/schema_0013-add_external_id_to_comment.sql new file mode 100644 index 000000000..a1cd11c3f --- /dev/null +++ b/db/schema_0013-add_external_id_to_comment.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE comment + ADD COLUMN external_id TEXT; + +commit; diff --git a/db/schema_0015-add_extra_to_comment.sql b/db/schema_0015-add_extra_to_comment.sql new file mode 100644 index 000000000..5c1789ea2 --- /dev/null +++ b/db/schema_0015-add_extra_to_comment.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE comment + ADD COLUMN extra TEXT; + +commit; diff --git a/db/schema_0016-add_whensent_and_send_fail_to_comment.sql b/db/schema_0016-add_whensent_and_send_fail_to_comment.sql new file mode 100644 index 000000000..792ff2e38 --- /dev/null +++ b/db/schema_0016-add_whensent_and_send_fail_to_comment.sql @@ -0,0 +1,11 @@ +begin; + +ALTER table comment + ADD column send_fail_count integer not null default 0; +ALTER table comment + ADD column send_fail_reason text; +ALTER table comment + ADD column send_fail_timestamp timestamp; +ALTER table comment + ADD column whensent timestamp; +commit; diff --git a/db/schema_0017-add_send_comments_to_open311conf.sql b/db/schema_0017-add_send_comments_to_open311conf.sql new file mode 100644 index 000000000..0ee015575 --- /dev/null +++ b/db/schema_0017-add_send_comments_to_open311conf.sql @@ -0,0 +1,6 @@ +begin; + +ALTER table open311conf + ADD column send_comments BOOL NOT NULL DEFAULT 'f'; + +commit; diff --git a/db/schema_0018-add_comment_user_to_open311conf.sql b/db/schema_0018-add_comment_user_to_open311conf.sql new file mode 100644 index 000000000..93851e2a3 --- /dev/null +++ b/db/schema_0018-add_comment_user_to_open311conf.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE open311conf + ADD COLUMN comment_user_id INT REFERENCES users(id); + +commit; diff --git a/db/schema_0019-add_title_to_users.sql b/db/schema_0019-add_title_to_users.sql new file mode 100644 index 000000000..1cc7dd16d --- /dev/null +++ b/db/schema_0019-add_title_to_users.sql @@ -0,0 +1,8 @@ +-- These are changes needed to the schema to support moving over to DBIx::Class + +begin; + +AlTER TABLE users + ADD COLUMN title text; + +commit; diff --git a/db/schema_0020-add_suppress_alerts_to_open311.sql b/db/schema_0020-add_suppress_alerts_to_open311.sql new file mode 100644 index 000000000..26fc54617 --- /dev/null +++ b/db/schema_0020-add_suppress_alerts_to_open311.sql @@ -0,0 +1,6 @@ +begin; + +ALTER table open311conf + ADD column suppress_alerts BOOL NOT NULL DEFAULT 'f'; + +commit; |