From 4c5fe7626d9fc482e2be8fa66090a99ad6a1141f Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Thu, 12 Jul 2012 17:25:52 +0100
Subject: add in external_source and external_source_id to schema

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

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 832104991..690b7080f 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -198,7 +198,11 @@ create table problem (
     send_fail_timestamp timestamp,
     
     -- record send_method used, which can be used to infer usefulness of external_id
-    send_method_used text
+    send_method_used text,
+
+    -- record details about messages from external sources, eg. message manager
+    external_source text,
+    external_source_id text
 );
 create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude);
 create index problem_user_id_idx on problem ( user_id );
-- 
cgit v1.2.3


From ee7770bb0130e2e0483af203c7410dad8269bdd7 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Thu, 23 Aug 2012 12:45:18 +0100
Subject: initial crude add support option for a problem

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

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 690b7080f..571c71bcd 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -202,7 +202,10 @@ create table problem (
 
     -- record details about messages from external sources, eg. message manager
     external_source text,
-    external_source_id text
+    external_source_id text,
+
+    -- number of me toos
+    interest_count integer
 );
 create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude);
 create index problem_user_id_idx on problem ( user_id );
-- 
cgit v1.2.3


From 0fad1a7b85ac83dce778b7dd22cd9d74f524ce23 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Wed, 29 Aug 2012 17:43:22 +0100
Subject: allow endpoints to be configured at a category level default cobrand
 now checks for endpoint configuration and only extra fallbacks are in UK
 cobrand

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

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 571c71bcd..819a6c0be 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -82,6 +82,12 @@ create table contacts (
 
     -- extra fields required for open311
     extra text
+
+    -- per contact endpoint configuration
+    endpoint     text,
+    jurisdiction text default '',
+    api_key      text default '',
+    send_method  text
 );
 create unique index contacts_area_id_category_idx on contacts(area_id, category);
 
@@ -445,5 +451,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',
+    can_be_devolved boolean not null default 'f'
 );
-- 
cgit v1.2.3


From 77bdc1e160163846a2431d64b553f5386103d501 Mon Sep 17 00:00:00 2001
From: Struan Donald <struan@exo.org.uk>
Date: Wed, 26 Sep 2012 14:45:20 +0100
Subject: correct syntax error in schema

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

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 819a6c0be..a4323f880 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -81,7 +81,7 @@ create table contacts (
     note text not null,
 
     -- extra fields required for open311
-    extra text
+    extra text,
 
     -- per contact endpoint configuration
     endpoint     text,
-- 
cgit v1.2.3

