diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 13 | ||||
-rw-r--r-- | db/schema_0009-add_extra_to_problem.sql | 6 | ||||
-rw-r--r-- | db/schema_0010-add_open311_conf.sql | 11 | ||||
-rw-r--r-- | db/schema_0011-add_extra_to_contacts.sql | 6 |
4 files changed, 36 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql index 9c5b3d8fd..3ec3c6756 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -79,6 +79,9 @@ create table contacts ( whenedited timestamp not null, -- what the last change was for: author's notes note text not null + + -- extra fields required for open311 + extra text ); create unique index contacts_area_id_category_idx on contacts(area_id, category); @@ -176,6 +179,7 @@ create table problem ( lastupdate timestamp not null default ms_current_timestamp(), whensent timestamp, send_questionnaire boolean not null default 't' + extra text -- extra fields required for open311 ); create index problem_state_latitude_longitude_idx on problem(state, latitude, longitude); create index problem_user_id_idx on problem ( user_id ); @@ -387,3 +391,12 @@ create table admin_log ( whenedited timestamp not null default ms_current_timestamp() ); +-- Record open 311 configuration details + +create table open311conf ( + id serial primary key, + area_id integer not null unique, + endpoint text not null, + jurisdiction text, + api_key text +); diff --git a/db/schema_0009-add_extra_to_problem.sql b/db/schema_0009-add_extra_to_problem.sql new file mode 100644 index 000000000..bac5806c7 --- /dev/null +++ b/db/schema_0009-add_extra_to_problem.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE problem + ADD COLUMN extra TEXT; + +commit; diff --git a/db/schema_0010-add_open311_conf.sql b/db/schema_0010-add_open311_conf.sql new file mode 100644 index 000000000..920272c05 --- /dev/null +++ b/db/schema_0010-add_open311_conf.sql @@ -0,0 +1,11 @@ +begin; + +CREATE TABLE open311conf ( + id SERIAL PRIMARY KEY, + area_id INTEGER NOT NULL unique, + endpoint TEXT NOT NULL, + jurisdiction TEXT, + api_key TEXT +); + +commit; diff --git a/db/schema_0011-add_extra_to_contacts.sql b/db/schema_0011-add_extra_to_contacts.sql new file mode 100644 index 000000000..fd6eae807 --- /dev/null +++ b/db/schema_0011-add_extra_to_contacts.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE contacts + ADD COLUMN extra TEXT; + +commit; |