From d7c3106d64f8237a4f6388a0e51dcd29bae93ec8 Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Thu, 1 Dec 2016 16:51:04 +0000 Subject: =?UTF-8?q?Add=20=E2=80=98state=E2=80=99=20field=20to=20ResponseTe?= =?UTF-8?q?mplate=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'db/schema.sql') diff --git a/db/schema.sql b/db/schema.sql index d3bb5040e..e54c6b7b2 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -486,6 +486,7 @@ create table response_templates ( text text not null, created timestamp not null default current_timestamp, auto_response boolean NOT NULL DEFAULT 'f', + state text, unique(body_id, title) ); -- cgit v1.2.3 From bb99a8917a9b7fc38f0c0847f45c68659791b54a Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Wed, 14 Dec 2016 17:31:02 +0000 Subject: Add external_id field to ResponsePriority for use with Exor --- db/schema.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'db/schema.sql') diff --git a/db/schema.sql b/db/schema.sql index e54c6b7b2..23db82b65 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -135,6 +135,7 @@ CREATE TABLE response_priorities ( deleted boolean not null default 'f', name text not null, description text, + external_id text, unique(body_id, name) ); -- cgit v1.2.3 From 3f21a9742d89c3e4fda47a0be6ec2a17f802c99a Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Mon, 13 Feb 2017 15:13:12 +0000 Subject: Add customisable defect types. Problems can have an associated defect type, that can be assigned during an inspection. Include an admin interface for managing these types, that can also be assigned on a per-category basis, currently available to the Oxfordshire cobrand. (Also include 'TM' in traffic management Exor RDI output.) --- db/schema.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'db/schema.sql') diff --git a/db/schema.sql b/db/schema.sql index 23db82b65..18c1533d9 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -502,3 +502,21 @@ CREATE TABLE contact_response_priorities ( contact_id int REFERENCES contacts(id) NOT NULL, response_priority_id int REFERENCES response_priorities(id) NOT NULL ); + +CREATE TABLE defect_types ( + id serial not null primary key, + body_id int references body(id) not null, + name text not null, + description text not null, + extra text, + unique(body_id, name) +); + +CREATE TABLE contact_defect_types ( + id serial NOT NULL PRIMARY KEY, + contact_id int REFERENCES contacts(id) NOT NULL, + defect_type_id int REFERENCES defect_types(id) NOT NULL +); + +ALTER TABLE problem + ADD COLUMN defect_type_id int REFERENCES defect_types(id); -- cgit v1.2.3