aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-23 17:39:00 +0100
commit7cb6bb21f713bc07a06ece5f4109cd6bd5a7f0b0 (patch)
treeeaff3aa286d8e1910b33c204c79b6837e109a216 /db
parent9019fda388f9232181387e8cce1d28e8b89de1ee (diff)
parent3b0e39a4c89e4c184f30c6131936dc63845d6a1f (diff)
Merge remote-tracking branch 'origin/master' into phonegap
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql13
-rw-r--r--db/schema_0013-add_send_method_column_to_open311conf.sql7
-rw-r--r--db/schema_0014-add_send_fail_columns_to_problem.sql10
-rw-r--r--db/schema_0015-add_send_method_used_column_to_problem.sql6
4 files changed, 34 insertions, 2 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 395d1c07b..e1205099d 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -189,7 +189,15 @@ create table problem (
send_questionnaire boolean not null default 't',
extra text, -- extra fields required for open311
flagged boolean not null default 'f',
- geocode bytea
+ geocode bytea,
+
+ -- logging sending failures (used by webservices)
+ send_fail_count integer not null default 0,
+ send_fail_reason text,
+ send_fail_timestamp timestamp,
+
+ -- record send_method used, which can be used to infer usefulness of external_id
+ send_method_used text
);
create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude);
create index problem_user_id_idx on problem ( user_id );
@@ -419,5 +427,6 @@ create table open311conf (
area_id integer not null unique,
endpoint text not null,
jurisdiction text,
- api_key text
+ api_key text,
+ send_method text
);
diff --git a/db/schema_0013-add_send_method_column_to_open311conf.sql b/db/schema_0013-add_send_method_column_to_open311conf.sql
new file mode 100644
index 000000000..516fdd698
--- /dev/null
+++ b/db/schema_0013-add_send_method_column_to_open311conf.sql
@@ -0,0 +1,7 @@
+
+begin;
+
+ALTER table open311conf
+ ADD column send_method TEXT;
+
+commit;
diff --git a/db/schema_0014-add_send_fail_columns_to_problem.sql b/db/schema_0014-add_send_fail_columns_to_problem.sql
new file mode 100644
index 000000000..369c4118d
--- /dev/null
+++ b/db/schema_0014-add_send_fail_columns_to_problem.sql
@@ -0,0 +1,10 @@
+begin;
+
+ALTER table problem
+ ADD column send_fail_count integer not null default 0;
+ALTER table problem
+ ADD column send_fail_reason text;
+ALTER table problem
+ ADD column send_fail_timestamp timestamp;
+
+commit;
diff --git a/db/schema_0015-add_send_method_used_column_to_problem.sql b/db/schema_0015-add_send_method_used_column_to_problem.sql
new file mode 100644
index 000000000..0c6e0851d
--- /dev/null
+++ b/db/schema_0015-add_send_method_used_column_to_problem.sql
@@ -0,0 +1,6 @@
+begin;
+
+ALTER table problem
+ ADD column send_method_used text;
+
+commit;