diff options
author | Struan Donald <struan@exo.org.uk> | 2012-03-26 13:01:45 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-03-26 13:31:08 +0100 |
commit | 36be8fa66e593a53cce4199d1fbb4fcb78452bbe (patch) | |
tree | f8602914e17f484992e713d469591be1d0b43ccb /db | |
parent | 3ef282bed8cb0ff85b2a03ce5e622c3a68c78909 (diff) |
DB changes for comment sending
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 9 | ||||
-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 |
3 files changed, 24 insertions, 2 deletions
diff --git a/db/schema.sql b/db/schema.sql index aa008ce02..74b2eade6 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -312,7 +312,11 @@ create table comment ( -- other fields? one to indicate whether this was written by the council -- and should be highlighted in the display? external_id text, - extra 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); @@ -427,5 +431,6 @@ 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' ); 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..8d1426db0 --- /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 when_sent 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; |