diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
commit | a9a4fed583d7467c9c1f1fa56d42bcb75b4b488c (patch) | |
tree | 72941901b1bad732047bc6289139a387b049e6e8 /db/schema.sql | |
parent | 302f5961f5da13e8124e8d2e91e52a29f141946f (diff) | |
parent | 61e6d5928be1bedb68607f8fa36f0d971711a3f8 (diff) |
Merge branch 'new_statuses'
Diffstat (limited to 'db/schema.sql')
-rw-r--r-- | db/schema.sql | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/db/schema.sql b/db/schema.sql index 53c236dd6..99cf2832d 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -131,6 +131,7 @@ 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 flagged boolean not null default 'f' ); @@ -166,7 +167,13 @@ create table problem ( state text not null check ( state = 'unconfirmed' or state = 'confirmed' + or state = 'investigating' + or state = 'planned' + or state = 'in progress' + or state = 'closed' or state = 'fixed' + or state = 'fixed - council' + or state = 'fixed - user' or state = 'hidden' or state = 'partial' ), @@ -281,7 +288,17 @@ create table comment ( lang text not null default 'en-gb', cobrand_data text not null default '' check (cobrand_data ~* '^[a-z0-9]*$'), -- Extra data used in cobranded versions of the site mark_fixed boolean not null, - mark_open boolean not null default 'f' + mark_open boolean not null default 'f', + problem_state text check ( + problem_state = 'confirmed' + or problem_state = 'investigating' + or problem_state = 'planned' + or problem_state = 'in progress' + or problem_state = 'closed' + or problem_state = 'fixed' + or problem_state = 'fixed - council' + or problem_state = 'fixed - user' + ) -- other fields? one to indicate whether this was written by the council -- and should be highlighted in the display? ); @@ -380,6 +397,7 @@ create table admin_log ( object_type text not null check ( object_type = 'problem' or object_type = 'update' + or object_type = 'user' ), object_id integer not null, action text not null check ( |