aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema.sql')
-rw-r--r--db/schema.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 609a1445d..ea2698b0e 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -132,6 +132,7 @@ create table problem (
latitude double precision not null,
longitude double precision not null,
bodies_str text, -- the body(s) we'll report this problem to
+ bodies_missing text, -- the body(s) we had no contact details for
areas text not null, -- the mapit areas this location is in
category text not null default 'Other',
title text not null,
@@ -206,6 +207,7 @@ create index problem_state_latitude_longitude_idx on problem(state, latitude, lo
create index problem_user_id_idx on problem ( user_id );
create index problem_external_body_idx on problem(lower(external_body));
create index problem_radians_latitude_longitude_idx on problem(radians(latitude), radians(longitude));
+create index problem_bodies_str_array_idx on problem USING gin(regexp_split_to_array(bodies_str, ','));
create table questionnaire (
id serial not null primary key,