aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql6
-rw-r--r--db/schema_0021-add_external_source_columns_to_problem.sql8
2 files changed, 13 insertions, 1 deletions
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 );
diff --git a/db/schema_0021-add_external_source_columns_to_problem.sql b/db/schema_0021-add_external_source_columns_to_problem.sql
new file mode 100644
index 000000000..a74bcce7d
--- /dev/null
+++ b/db/schema_0021-add_external_source_columns_to_problem.sql
@@ -0,0 +1,8 @@
+begin;
+
+ALTER table problem
+ ADD column external_source TEXT;
+ALTER table problem
+ ADD column external_source_id TEXT;
+
+commit;