aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.sql
diff options
context:
space:
mode:
authormatthew <matthew>2007-01-19 16:57:28 +0000
committermatthew <matthew>2007-01-19 16:57:28 +0000
commitc4e49e322ff58e1e4a9126502c840e86fcd5a183 (patch)
treea23e640d8c659c6f9b398ec14303e3f98f55622c /db/schema.sql
parentb22e3411880b339954c38ee3f0fb8b37f0c5e3a5 (diff)
Deal with multiple councils, more error checking, tidy some code.
Diffstat (limited to 'db/schema.sql')
-rw-r--r--db/schema.sql9
1 files changed, 8 insertions, 1 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 4b6643b6f..dae44c420 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -4,7 +4,7 @@
-- Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
-- Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
--
--- $Id: schema.sql,v 1.12 2006-10-10 20:45:08 matthew Exp $
+-- $Id: schema.sql,v 1.13 2007-01-19 16:57:28 matthew Exp $
--
-- secret
@@ -73,16 +73,23 @@ create function ms_current_timestamp()
-- Problems reported by users of site
create table problem (
id serial not null primary key,
+
+ -- Problem details
postcode text not null,
easting double precision not null,
northing double precision not null,
+ council integer not null,
title text not null,
detail text not null,
photo bytea,
-- category integer not null references category(id),
+
+ -- User's details
name text not null,
email text not null,
phone text not null,
+
+ -- Metadata
created timestamp not null default ms_current_timestamp(),
state text not null check (
state = 'unconfirmed'