diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-02-19 16:41:22 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | 735536dc5e269f2094d122e49f2c648928db4acb (patch) | |
tree | 5779c470d6f326828f0f587f76bfc0841c03144f /db | |
parent | d004b2df0c85615eab6924c35f478b45bdf84b2d (diff) |
[Zurich] Response templates for report admin.
This provides a ResponseTemplate model that an admin/staff
user can choose from when responding to problems.
For mysociety/FixMyStreet-Commercial#671.
Diffstat (limited to 'db')
-rw-r--r-- | db/downgrade_0037---0036.sql | 1 | ||||
-rw-r--r-- | db/schema.sql | 9 | ||||
-rw-r--r-- | db/schema_0037-response-templates.sql | 8 |
3 files changed, 18 insertions, 0 deletions
diff --git a/db/downgrade_0037---0036.sql b/db/downgrade_0037---0036.sql new file mode 100644 index 000000000..39f73b308 --- /dev/null +++ b/db/downgrade_0037---0036.sql @@ -0,0 +1 @@ +drop table response_templates; diff --git a/db/schema.sql b/db/schema.sql index 2db89bddb..e87a2aafe 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -457,3 +457,12 @@ create table user_body_permissions ( ), unique(user_id, body_id, permission_type) ); + +create table response_templates ( + id serial not null primary key, + body_id int references body(id) not null, + title text not null, + text text not null, + created timestamp not null default current_timestamp, + unique(body_id, title) +); diff --git a/db/schema_0037-response-templates.sql b/db/schema_0037-response-templates.sql new file mode 100644 index 000000000..4534e1e84 --- /dev/null +++ b/db/schema_0037-response-templates.sql @@ -0,0 +1,8 @@ +create table response_templates ( + id serial not null primary key, + body_id int references body(id) not null, + title text not null, + text text not null, + created timestamp not null default current_timestamp, + unique(body_id, title) +); |