diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-08-19 15:55:41 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-08-19 15:55:41 +0100 |
commit | 8dfdbf84b57d8bbc179dcb895d6eb08c61fdef59 (patch) | |
tree | 4c463f153d69290e4850cbb71c016066e5ed5879 /db/schema.sql | |
parent | 0784bdae637e3d0ca20dc3d66ec50c5d68e489ec (diff) | |
parent | b812f8526525c0f38d72bdc469ddc08b376854d2 (diff) |
Merge branch 'bodies_str-factoring'
Diffstat (limited to 'db/schema.sql')
-rw-r--r-- | db/schema.sql | 2 |
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, |