diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-10 16:51:09 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 18:32:04 +0100 |
commit | e46f7af02ad2b54033bc9c525e7473ca256d9188 (patch) | |
tree | 42b5cee8ffae216504f87e8842fb0abb86e4c835 /db | |
parent | 68461d28992628ff394e05d56ab3ab962d048db0 (diff) |
add flagged flags to problems and users
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 6 | ||||
-rw-r--r-- | db/schema_0005-add_abuse_flags_to_users_and_reports.sql | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/db/schema.sql b/db/schema.sql index 9c5b3d8fd..d0a9c3c9a 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -130,7 +130,8 @@ create table users ( email text not null unique, name text, phone text, - password text not null default '' + password text not null default '', + flagged boolean not null default 'f' ); -- Problems reported by users of site @@ -175,7 +176,8 @@ create table problem ( cobrand_data text not null default '' check (cobrand_data ~* '^[a-z0-9]*$'), -- Extra data used in cobranded versions of the site lastupdate timestamp not null default ms_current_timestamp(), whensent timestamp, - send_questionnaire boolean not null default 't' + send_questionnaire boolean not null default 't', + flagged boolean not null default 'f', ); 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_0005-add_abuse_flags_to_users_and_reports.sql b/db/schema_0005-add_abuse_flags_to_users_and_reports.sql new file mode 100644 index 000000000..040d3294d --- /dev/null +++ b/db/schema_0005-add_abuse_flags_to_users_and_reports.sql @@ -0,0 +1,9 @@ +begin; + +ALTER table problem + ADD column flagged BOOL NOT NULL DEFAULT 'f'; + +ALTER table users + ADD column flagged BOOL NOT NULL DEFAULT 'f'; + +commit; |