From e5f199be14d2ba82ca03524f7d1fb2fc79f7677e Mon Sep 17 00:00:00 2001
From: matthew <matthew>
Date: Fri, 4 May 2007 14:36:55 +0000
Subject: NFI questionnaire code. Deals with sending out questionnaires, taking
 in responses,updating problems, etc. What's left is front-end display issues
 such as timing out old problems, moving them to different lists, etc.

---
 db/schema.sql | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'db/schema.sql')

diff --git a/db/schema.sql b/db/schema.sql
index 47c71c73f..f000482f8 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.26 2007-05-03 09:34:20 matthew Exp $
+-- $Id: schema.sql,v 1.27 2007-05-04 14:36:55 matthew Exp $
 --
 
 -- secret
@@ -145,10 +145,19 @@ create table problem (
         or state = 'fixed'
         or state = 'hidden'
     ),
-    whensent timestamp
+    whensent timestamp,
+    send_questionnaire boolean not null default 't'
 );
 create index problem_state_easting_northing_idx on problem(state, easting, northing);
 
+create table questionnaire (
+    id serial not null primary key,
+    problem_id integer not null references problem(id),
+    whensent timestamp not null,
+    whenanswered timestamp,
+    ever_reported boolean
+);
+
 -- angle_between A1 A2
 -- Given two angles A1 and A2 on a circle expressed in radians, return the
 -- smallest angle between them.
-- 
cgit v1.2.3

