diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-03-11 17:34:38 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-03-11 17:34:38 +0000 |
commit | 4df8d9979a4325bf2b47f401b4095654dd43d3a9 (patch) | |
tree | 64984c71916683830a1b1eef4deee8a04307cd80 /bin | |
parent | eee9a69a1959f060fdbe7d346d594a76a3b39909 (diff) | |
parent | de47a7fad977156c67748deed6b3f154fc849035 (diff) |
Merge remote branch 'origin/sweden-rebase'
Conflicts:
bin/update-schema
locale/sv_SE.UTF-8/LC_MESSAGES/FixMyStreet.po
perllib/FixMyStreet/DB/Result/Body.pm
Diffstat (limited to 'bin')
-rw-r--r-- | bin/open311-update-reports | 21 | ||||
-rwxr-xr-x | bin/update-schema | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/bin/open311-update-reports b/bin/open311-update-reports new file mode 100644 index 000000000..e7ff34273 --- /dev/null +++ b/bin/open311-update-reports @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Open311::GetUpdates; +use FixMyStreet::App; + +# FIXME - make this configurable and/or better +my $system_user = FixMyStreet::App->model('DB::User')->find_or_create( + { + email => FixMyStreet::App->config->{'CONTACT_EMAIL'}, + name => 'System User', + } +); + +my $council_list = FixMyStreet::App->model('DB::Body'); + +my $update = Open311::GetUpdates->new( + council_list => $council_list, + system_user => $system_user +)->get_updates; diff --git a/bin/update-schema b/bin/update-schema index ef33b82a7..be5bc50e7 100755 --- a/bin/update-schema +++ b/bin/update-schema @@ -85,6 +85,7 @@ print "Nothing to do\n" if $nothing; # By querying the database schema, we can see where we're currently at # (assuming schema change files are never half-applied, which should be the case) sub get_db_version { + return '0031' if column_exists('body', 'external_url'); return '0030' if ! constraint_exists('admin_log_action_check'); return '0029' if column_exists('body', 'deleted'); return '0028' if table_exists('body'); |