diff options
author | Marius Halden <marius.h@lden.org> | 2020-09-29 14:23:52 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2020-09-29 14:23:52 +0200 |
commit | a27ce1524d801d2742a2bdb6ec1da45126d64353 (patch) | |
tree | 64123c4e17dc1776aa0a7cd65ee01d49d3e7d978 /db/schema.sql | |
parent | 377bd96aab7cad3434185c30eb908c9da447fe40 (diff) | |
parent | 2773c60226b9370fe8ee00f7b205b571bb87c3b5 (diff) |
Merge tag 'v3.0.1' into fiksgatami-dev
Diffstat (limited to 'db/schema.sql')
-rw-r--r-- | db/schema.sql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql index 98005028c..ed21aded6 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -35,6 +35,7 @@ create table users ( title text, twitter_id bigint unique, facebook_id bigint unique, + oidc_ids text ARRAY, area_ids integer ARRAY, extra text ); @@ -73,6 +74,22 @@ create unique index body_areas_body_id_area_id_idx on body_areas(body_id, area_i ALTER TABLE users ADD CONSTRAINT users_from_body_fkey FOREIGN KEY (from_body) REFERENCES body(id); +-- roles table +create table roles ( + id serial not null primary key, + body_id integer not null references body(id) ON DELETE CASCADE, + name text, + permissions text ARRAY, + unique(body_id, name) +); + +-- Record which role(s) each user holds +create table user_roles ( + id serial not null primary key, + role_id integer not null references roles(id) ON DELETE CASCADE, + user_id integer not null references users(id) ON DELETE CASCADE +); + -- The contact for a category within a particular body create table contacts ( id serial primary key, @@ -83,6 +100,7 @@ create table contacts ( state = 'unconfirmed' or state = 'confirmed' or state = 'inactive' + or state = 'staff' or state = 'deleted' ), @@ -120,6 +138,7 @@ create table contacts_history ( state = 'unconfirmed' or state = 'confirmed' or state = 'inactive' + or state = 'staff' or state = 'deleted' ), @@ -428,6 +447,11 @@ create table admin_log ( or object_type = 'update' or object_type = 'user' or object_type = 'moderation' + or object_type = 'template' + or object_type = 'body' + or object_type = 'category' + or object_type = 'role' + or object_type = 'manifesttheme' ), object_id integer not null, action text not null, @@ -541,3 +565,13 @@ CREATE TABLE state ( type text not null check (type = 'open' OR type = 'closed' OR type = 'fixed'), name text not null unique ); + +CREATE TABLE manifest_theme ( + id serial not null primary key, + cobrand text not null unique, + name text not null, + short_name text not null, + background_colour text, + theme_colour text, + images text ARRAY +); |