aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.sql
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-08-23 17:28:11 +0100
committerDave Arter <davea@mysociety.org>2016-09-08 09:45:58 +0100
commit1444841970096122c9aeb5e86c82bede01b1bee6 (patch)
tree79b96fda21ce35037d05065644a1043077bf1717 /db/schema.sql
parent80a01c11f656f19d6df4c2e4294f613db14689b1 (diff)
Extend response templates to work across all cobrands
This builds on the response templates in the Zürich cobrand: - Allow response templates to be assigned to categories - Also adds a auto_response flag, which will be used to automatically create updates when reports are made. - Include response templates select box on update form For mysociety/fixmystreetforcouncils#31
Diffstat (limited to 'db/schema.sql')
-rw-r--r--db/schema.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql
index b11bb30b7..c96059fb1 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -473,5 +473,12 @@ create table response_templates (
title text not null,
text text not null,
created timestamp not null default current_timestamp,
+ auto_response boolean NOT NULL DEFAULT 'f',
unique(body_id, title)
);
+
+CREATE TABLE contact_response_templates (
+ id serial NOT NULL PRIMARY KEY,
+ contact_id int REFERENCES contacts(id) NOT NULL,
+ response_template_id int REFERENCES response_templates(id) NOT NULL
+);