aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema_0007-add-comment-problem-state.sql
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-23 14:26:26 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-23 14:26:26 +0100
commit41c7d068f954e062b4da0675b5782211b8ad10c3 (patch)
tree509bfd3ae053af990e98d81b9ac328d66801a3c6 /db/schema_0007-add-comment-problem-state.sql
parent59e5a595bd0a903f25eb6210209cec5afe1f699c (diff)
add problem state_column to comment
Diffstat (limited to 'db/schema_0007-add-comment-problem-state.sql')
-rw-r--r--db/schema_0007-add-comment-problem-state.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/schema_0007-add-comment-problem-state.sql b/db/schema_0007-add-comment-problem-state.sql
new file mode 100644
index 000000000..8fa361d83
--- /dev/null
+++ b/db/schema_0007-add-comment-problem-state.sql
@@ -0,0 +1,16 @@
+begin;
+
+ ALTER TABLE comment ADD column problem_state text;
+
+ ALTER TABLE comment ADD CONSTRAINT problem_state_check CHECK (
+ problem_state = 'confirmed'
+ or problem_state = 'investigating'
+ or problem_state = 'planned'
+ or problem_state = 'in progress'
+ or problem_state = 'closed'
+ or problem_state = 'fixed'
+ or problem_state = 'fixed - council'
+ or problem_state = 'fixed - user'
+ );
+
+commit;