aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql6
-rw-r--r--db/schema_0005-add_abuse_flags_to_users_and_reports.sql9
2 files changed, 13 insertions, 2 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 5213e8a02..99cf2832d 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -131,7 +131,8 @@ create table users (
name text,
phone text,
password text not null default '',
- from_council integer -- id of council user is from or null/0 if not
+ from_council integer, -- id of council user is from or null/0 if not
+ flagged boolean not null default 'f'
);
-- Problems reported by users of site
@@ -182,7 +183,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;