diff options
author | Jon Kristensen <info@jonkri.com> | 2014-03-01 23:10:38 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2014-03-11 17:32:55 +0000 |
commit | c44317e640cfe9dd766f09598873d8b96db2414a (patch) | |
tree | b6c20473440f452399dd137412757186d9165591 /perllib/FixMyStreet | |
parent | cf20c709e13af0909620ac5387b7d070b66b8c52 (diff) |
Add `external_url' column to `body' table.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 3d3ddce1e..128ef2790 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -669,6 +669,7 @@ sub setup_categories_and_bodies : Private { # put results onto stash for display $c->stash->{bodies} = \%bodies; $c->stash->{all_body_names} = [ map { $_->name } values %bodies ]; + $c->stash->{all_body_urls} = [ map { $_->external_url } values %bodies ]; $c->stash->{bodies_to_list} = [ keys %bodies_to_list ]; $c->stash->{category_options} = \@category_options; $c->stash->{category_extras} = \%category_extras; diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 83704563a..bab16061b 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -40,6 +40,8 @@ __PACKAGE__->add_columns( { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "parent", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "external_url", + { data_type => "text", is_nullable => 0 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( |