diff options
Diffstat (limited to 'db/schema.sql')
| -rw-r--r-- | db/schema.sql | 28 | 
1 files changed, 26 insertions, 2 deletions
| diff --git a/db/schema.sql b/db/schema.sql index 437541898..021c5561d 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -81,7 +81,16 @@ create table contacts (      note text not null,      -- extra fields required for open311 -    extra text +    extra text, + +    -- for things like missed bin collections +    non_public boolean default 'f', + +    -- 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); @@ -202,10 +211,24 @@ 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, + +    -- for things like missed bin collections +    non_public BOOLEAN default 'f', + +    -- record details about messages from external sources, eg. message manager +    external_source text, +    external_source_id text, + +    -- number of me toos +    interest_count integer default 0, + +    -- subcategory to enable filtering in reporting -- +    subcategory text  );  create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude);  create index problem_user_id_idx on problem ( user_id ); +create index problem_external_body_idx on problem(lower(external_body));  create table questionnaire (      id serial not null primary key, @@ -447,5 +470,6 @@ create table open311conf (      send_comments boolean not null default 'f',      comment_user_id int references users(id),      suppress_alerts boolean not null default 'f', +    can_be_devolved boolean not null default 'f',      send_extended_statuses boolean not null default 'f'  ); | 
