aboutsummaryrefslogtreecommitdiffstats
path: root/bin/update-schema
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2013-09-11 17:37:54 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2013-09-13 15:09:02 +0100
commit0053c2a413843df34d5353c4757f556fb4f78dab (patch)
tree1fb0f52da50976070ccbe09a0e668f748de47051 /bin/update-schema
parent94ac7786132a538a5742ba325eb7fe9eff89cfc9 (diff)
Do fewer things for a dev installation.
If the development parameter is passed to the install-script, don't install a crontab, don't set up nginx, don't force the repository to a particular version, and don't set up an application server. Also only create a general.yml file if one doesn't already exist, and add some locales that the test suite assumes are present. And run the db schema update script.
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';