From 41c7d068f954e062b4da0675b5782211b8ad10c3 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 23 Jun 2011 14:26:26 +0100 Subject: add problem state_column to comment --- db/schema_0007-add-comment-problem-state.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/schema_0007-add-comment-problem-state.sql (limited to 'db/schema_0007-add-comment-problem-state.sql') 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; -- cgit v1.2.3 From fbee20dd5eac49e0c6ad7b6ffefec20409bc54f6 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 30 Jun 2011 18:06:46 +0100 Subject: rename constraint in line with how postgres would name it --- db/schema_0007-add-comment-problem-state.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/schema_0007-add-comment-problem-state.sql') diff --git a/db/schema_0007-add-comment-problem-state.sql b/db/schema_0007-add-comment-problem-state.sql index 8fa361d83..2a3a95ada 100644 --- a/db/schema_0007-add-comment-problem-state.sql +++ b/db/schema_0007-add-comment-problem-state.sql @@ -2,7 +2,7 @@ begin; ALTER TABLE comment ADD column problem_state text; - ALTER TABLE comment ADD CONSTRAINT problem_state_check CHECK ( + ALTER TABLE comment ADD CONSTRAINT comment_problem_state_check CHECK ( problem_state = 'confirmed' or problem_state = 'investigating' or problem_state = 'planned' -- cgit v1.2.3