aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql9
-rw-r--r--db/schema_0016-add_whensent_and_send_fail_to_comment.sql11
-rw-r--r--db/schema_0017-add_send_comments_to_open311conf.sql6
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;