bug 8798: (follow-up) pass DB connection params to DBIC schema updater explicitly
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 20:57:24 +0000 (20:57 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:08:03 +0000 (21:08 +0000)
commite0b0ae20531736ede2cd1113baf16323cb69b3d9
tree14199160a146f0f997bc71341467f5b95e0da6e9
parent79e3a884aeb8c48e950430b4e292739bda229e85
bug 8798: (follow-up) pass DB connection params to DBIC schema updater explicitly

This patch changes update_dbix_class_files.pl so that the connection
parameters to the reference database must be passed explicitly via
command-line switches, rather than grabbing them from the current Koha
context.

The purpose of this is to intentionally put up a roadblock to reduce
the chance that a developer (or release manager) accidentally updates
the schema files to include local testing cruft such as temporary
tables.

Usage is now as follows:

[1] Create an empty database
[2] Load the schema creation script into it, e.g.,

mysql -u dbic -pdbic dbic < installer/data/mysql/kohastructure.sql

[3] Run the schema updater:

./misc/devel/update_dbix_class_files.pl --db_user=dbic --db_name=dbic --db_passwd=dbic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/devel/update_dbix_class_files.pl