From be97fe44d9954ce3c84d98030f2ebc6ae84a5a61 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Fri, 31 Aug 2012 16:40:04 +0100
Subject: initial work to handle changed problem states

---
 db/schema.sql | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 832104991..60ad8eda4 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -180,6 +180,10 @@ create table problem (
         or state = 'fixed - user'
         or state = 'hidden'
         or state = 'partial'
+        or state = 'action scheduled'
+        or state = 'unable to fix'
+        or state = 'not councils responsibility'
+        or state = 'duplicate'
     ),
     lang text not null default 'en-gb',
     service text not null default '',
@@ -312,6 +316,10 @@ create table comment (
         or problem_state = 'fixed'
         or problem_state = 'fixed - council'
         or problem_state = 'fixed - user'
+        or problem_state = 'action scheduled'
+        or problem_state = 'unable to fix'
+        or problem_state = 'not councils responsibility'
+        or problem_state = 'duplicate'
     ),
     -- other fields? one to indicate whether this was written by the council
     -- and should be highlighted in the display?
-- 
cgit v1.2.3


From 515190b62e24ab43e150c4d65b55c774682f2578 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Mon, 1 Oct 2012 16:00:30 +0100
Subject: tidy up status names in DB, improve tests a little

---
 db/schema.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 60ad8eda4..d714a463b 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -182,7 +182,7 @@ create table problem (
         or state = 'partial'
         or state = 'action scheduled'
         or state = 'unable to fix'
-        or state = 'not councils responsibility'
+        or state = 'not responsible'
         or state = 'duplicate'
     ),
     lang text not null default 'en-gb',
@@ -318,7 +318,7 @@ create table comment (
         or problem_state = 'fixed - user'
         or problem_state = 'action scheduled'
         or problem_state = 'unable to fix'
-        or problem_state = 'not councils responsibility'
+        or problem_state = 'not responsible'
         or problem_state = 'duplicate'
     ),
     -- other fields? one to indicate whether this was written by the council
-- 
cgit v1.2.3


From 9c9fb7456d614c7d96881751a14f2dfff5c4225d Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Wed, 3 Oct 2012 15:23:31 +0100
Subject: add send_extended_statuses conf option and use in send-comments

---
 db/schema.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index d714a463b..ef1bee624 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -446,5 +446,6 @@ create table open311conf (
     send_method  text,
     send_comments boolean not null default 'f',
     comment_user_id int references users(id),
-    suppress_alerts boolean not null default 'f'
+    suppress_alerts boolean not null default 'f',
+    send_extended_statuses boolean not null default 'f'
 );
-- 
cgit v1.2.3


From 1b72087884c1577f3abd0858c9cd575f7d9cb800 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Wed, 3 Oct 2012 16:33:58 +0100
Subject: order of conditions in constraints need to match exactly to make
 deployment schema test pass

---
 db/schema.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index ef1bee624..437541898 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -174,13 +174,13 @@ create table problem (
         or state = 'investigating'
         or state = 'planned'
         or state = 'in progress'
+        or state = 'action scheduled'
         or state = 'closed'
         or state = 'fixed'
         or state = 'fixed - council'
         or state = 'fixed - user'
         or state = 'hidden'
         or state = 'partial'
-        or state = 'action scheduled'
         or state = 'unable to fix'
         or state = 'not responsible'
         or state = 'duplicate'
@@ -312,11 +312,11 @@ create table comment (
         or problem_state = 'investigating'
         or problem_state = 'planned'
         or problem_state = 'in progress'
+        or problem_state = 'action scheduled'
         or problem_state = 'closed'
         or problem_state = 'fixed'
         or problem_state = 'fixed - council'
         or problem_state = 'fixed - user'
-        or problem_state = 'action scheduled'
         or problem_state = 'unable to fix'
         or problem_state = 'not responsible'
         or problem_state = 'duplicate'
-- 
cgit v1.2.3

