From b715f69fc0a92e25761f124a3a05b7116a73c598 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 13 Dec 2012 12:27:38 +0000 Subject: Convert report sending code to use bodies rather than areas/councils. --- db/schema.sql | 1 + db/schema_0030-add-body-name.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 db/schema_0030-add-body-name.sql (limited to 'db') diff --git a/db/schema.sql b/db/schema.sql index 549222b1a..9fd4ce332 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -419,6 +419,7 @@ create table admin_log ( create table body ( id serial primary key, + name text not null, area_id integer not null unique, endpoint text, jurisdiction text, diff --git a/db/schema_0030-add-body-name.sql b/db/schema_0030-add-body-name.sql new file mode 100644 index 000000000..30ac26e98 --- /dev/null +++ b/db/schema_0030-add-body-name.sql @@ -0,0 +1,7 @@ +begin; + +ALTER TABLE body ADD name text; +UPDATE body SET name=''; +ALTER table body ALTER COLUMN name SET NOT NULL; + +commit; -- cgit v1.2.3