aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.sql20
-rw-r--r--db/schema_0028-rename_from_council.sql5
2 files changed, 6 insertions, 19 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 87b5102c7..a829e68db 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -4,8 +4,6 @@
-- Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
-- Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
--
--- $Id: schema.sql,v 1.49 2009-11-10 13:53:33 louise Exp $
---
-- secret
-- A random secret.
@@ -19,22 +17,6 @@ create table debugdate (
override_today date
);
--- Returns the date of "today", which can be overriden for testing.
-create function ms_current_date()
- returns date as '
- declare
- today date;
- begin
- today = (select override_today from debugdate);
- if today is not null then
- return today;
- else
- return current_date;
- end if;
-
- end;
-' language 'plpgsql' stable;
-
-- Returns the timestamp of current time, but with possibly overriden "today".
create function ms_current_timestamp()
returns timestamp as '
@@ -143,7 +125,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
+ from_body integer, -- id of body user is from or null/0 if not
flagged boolean not null default 'f',
title text
);
diff --git a/db/schema_0028-rename_from_council.sql b/db/schema_0028-rename_from_council.sql
new file mode 100644
index 000000000..027a257a4
--- /dev/null
+++ b/db/schema_0028-rename_from_council.sql
@@ -0,0 +1,5 @@
+begin;
+
+ALTER TABLE users RENAME COLUMN from_council TO from_body;
+
+commit;