aboutsummaryrefslogtreecommitdiffstats
path: root/bin/update-schema
diff options
context:
space:
mode:
authorChris Mytton <self@hecticjeff.net>2013-09-16 18:12:10 +0100
committerChris Mytton <self@hecticjeff.net>2013-09-16 18:12:10 +0100
commit7fb201b040bad4112a2b36955be09f297fd6a0dd (patch)
treebb5815a0f345d4f5adf749b4071363c1580e69f8 /bin/update-schema
parentb44f9edab53f59fb442e5ee4db28cb25408c652c (diff)
parentc8a06f8b1dec400ed68e609fbeba0f72c17f42e7 (diff)
Merge branch 'master' into oxfordshire-usability-recommendations
Diffstat (limited to 'bin/update-schema')
-rwxr-xr-x[-rw-r--r--]bin/update-schema7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/update-schema b/bin/update-schema
index 81c9ff4ab..92868e1b6 100644..100755
--- a/bin/update-schema
+++ b/bin/update-schema
@@ -19,13 +19,14 @@ use mySociety::DBHandle qw(dbh);
use mySociety::MaPit;
mySociety::Config::set_file("$FindBin::Bin/../conf/general");
-mySociety::DBHandle::configure(
+my %args = (
Name => mySociety::Config::get('FMS_DB_NAME'),
User => mySociety::Config::get('FMS_DB_USER'),
Password => mySociety::Config::get('FMS_DB_PASS'),
- Host => mySociety::Config::get('FMS_DB_HOST', undef),
- Port => mySociety::Config::get('FMS_DB_PORT', undef)
);
+$args{Host} = mySociety::Config::get('FMS_DB_HOST', undef) if mySociety::Config::get('FMS_DB_HOST');
+$args{Port} = mySociety::Config::get('FMS_DB_PORT', undef) if mySociety::Config::get('FMS_DB_PORT');
+mySociety::DBHandle::configure( %args );
my $commit = 0;
$commit = 1 if @ARGV && $ARGV[0] eq '--commit';