diff options
Diffstat (limited to 'db/schema.sql')
-rw-r--r-- | db/schema.sql | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/db/schema.sql b/db/schema.sql index 30f5d3a30..98005028c 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -35,7 +35,7 @@ create table users ( title text, twitter_id bigint unique, facebook_id bigint unique, - area_id integer, + area_ids integer ARRAY, extra text ); CREATE UNIQUE INDEX users_email_verified_unique ON users (email) WHERE email_verified; @@ -427,6 +427,7 @@ create table admin_log ( object_type = 'problem' or object_type = 'update' or object_type = 'user' + or object_type = 'moderation' ), object_id integer not null, action text not null, @@ -441,7 +442,7 @@ create table moderation_original_data ( -- Problem details problem_id int references problem(id) ON DELETE CASCADE not null, - comment_id int references comment(id) ON DELETE CASCADE unique, + comment_id int references comment(id) ON DELETE CASCADE, title text null, detail text null, -- or text for comment @@ -449,8 +450,14 @@ create table moderation_original_data ( anonymous bool not null, -- Metadata - created timestamp not null default current_timestamp + created timestamp not null default current_timestamp, + + extra text, + category text, + latitude double precision, + longitude double precision ); +create index moderation_original_data_problem_id_comment_id_idx on moderation_original_data(problem_id, comment_id); create table user_body_permissions ( id serial not null primary key, |