diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 1 | ||||
-rw-r--r-- | db/schema_0030-add-body-name.sql | 7 |
2 files changed, 8 insertions, 0 deletions
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; |