aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema.sql')
-rw-r--r--db/schema.sql18
1 files changed, 18 insertions, 0 deletions
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);