diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-19 14:19:30 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-19 14:43:26 +0000 |
commit | 1c1e454cc049531fc99c5c4d4eed293aab40d406 (patch) | |
tree | b9263249c6e8eccfaaab7ed9dc75986749da1080 /db | |
parent | 3e30cee562d3eae98d73e63dc2d9708b09e24e81 (diff) |
Allow bodies to have parent bodies.
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.sql | 1 | ||||
-rw-r--r-- | db/schema_0034-add-body-parent.sql | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql index e8ec42859..d8cc0675a 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -55,6 +55,7 @@ create table users ( create table body ( id serial primary key, name text not null, + parent integer references body(id), endpoint text, jurisdiction text, api_key text, diff --git a/db/schema_0034-add-body-parent.sql b/db/schema_0034-add-body-parent.sql new file mode 100644 index 000000000..9360fbcb3 --- /dev/null +++ b/db/schema_0034-add-body-parent.sql @@ -0,0 +1,5 @@ +begin; + +ALTER TABLE body ADD parent INTEGER REFERENCES body(id); + +commit; |