aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql4
-rw-r--r--db/schema_0005-add_abuse_flags_to_users_and_reports.sql9
2 files changed, 12 insertions, 1 deletions
diff --git a/db/schema.sql b/db/schema.sql
index e9dff0f84..d7bbf1127 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -133,7 +133,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
@@ -180,6 +181,7 @@ create table problem (
whensent timestamp,
send_questionnaire boolean not null default 't',
extra text -- extra fields required for open311
+ 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;