From 33074d2d554990621d6941f9c7bf02b7a8ffb18a Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Wed, 15 Jun 2011 15:22:38 +0100
Subject: update constraint on problem states

---
 db/schema_0006-alter_problem_state.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 db/schema_0006-alter_problem_state.sql

(limited to 'db/schema_0006-alter_problem_state.sql')

diff --git a/db/schema_0006-alter_problem_state.sql b/db/schema_0006-alter_problem_state.sql
new file mode 100644
index 000000000..1fdd30cb2
--- /dev/null
+++ b/db/schema_0006-alter_problem_state.sql
@@ -0,0 +1,19 @@
+begin;
+
+    ALTER TABLE problem DROP CONSTRAINT problem_state_check;
+
+    ALTER TABLE problem ADD CONSTRAINT problem_state_check CHECK ( 
+        state = 'unconfirmed'
+        or state = 'confirmed'
+        or state = 'investigating'
+        or state = 'planned'
+        or state = 'in progress'
+        or state = 'will not fix'
+        or state = 'fixed'
+        or state = 'fixed - council'
+        or state = 'fixed - user'
+        or state = 'hidden'
+        or state = 'partial'
+    );
+
+commit;
-- 
cgit v1.2.3

