Koha/misc/devel
Julian Maurice 1bcc2159a5
Bug 21177: Use koha-conf.xml in misc/devel/update_dbix_class_files.pl
It is annoying to have to specify database connection parameters each
time DBIx::Class files need to be updated.

This patch adds a new option --koha-conf that takes an optional <path>
which defaults to the value of KOHA_CONF environment variable, and use
the database connection parameters found in that file.
--db_* options override values from $KOHA_CONF

Test plan:
1. Run the script with the same parameters as before the patch and see
   that it still works.
   Example:
     misc/devel/update_dbix_class_files.pl --db_name koha_dev \
     --db_user koha --db_pass koha

2. Verify that KOHA_CONF is set and execute:
     misc/devel/update_dbix_class_files.pl --koha-conf
   Verify that Koha/Schema files were updated accordingly

3. Execute:
    misc/devel/update_dbix_class_files.pl --koha-conf \
    /path/to/another/koha-conf.xml
   Verify that Koha/Schema files were updated accordingly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-10 10:12:15 +00:00
..
add_missing_filters.pl Bug 21576: Add a developer script to fix missing TT filters 2018-10-26 17:09:51 +00:00
coverage.pl Bug 13899: (QA followup) POD and usage message fixes 2015-05-26 14:22:34 -03:00
create_superlibrarian.pl Bug 22600: Set 'commandline' interface appropriately 2019-04-10 19:43:11 +00:00
install_plugins.pl Bug 23191: (follow-up) Improve output 2019-06-25 17:19:56 +01:00
update_dbix_class_files.pl Bug 21177: Use koha-conf.xml in misc/devel/update_dbix_class_files.pl 2020-02-10 10:12:15 +00:00