Bug 23895: Move installer file into the mandatory directory

Prior to this patch we had a confusing situation, mandatory files were
in both installer/data/mysql and installer/data/mysql/mandatory
To make things clearer this patch move them all into the mandatory
subdir.
However kohastructure.sql stay in the "root" directory.

Test plan:
1. Drop and recreate your DB and use the installer to populate the DB
2. Use the merge request code from misc4dev to test the reset_all alias
3. Still with the merge request from misc4dev checkout master (you can
also try 19.11 and/or 19.05) and reset_all again
=> All the data from the SQL mandatory files must have been correctly
inserted into the DB

https://gitlab.com/koha-community/koha-misc4dev/-/issues/46

Note that this patch also remove the x flag for subtag_registry.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-06-16 12:56:56 +02:00
parent b845c5601a
commit a15a7f5d81
9 changed files with 8 additions and 7 deletions

View file

@ -331,8 +331,8 @@ sub load_sql_in_order {
my $global_mandatory_dir = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory"; my $global_mandatory_dir = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory";
# Make sure some stuffs are loaded first # Make sure some stuffs are loaded first
unshift(@fnames, C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql");
unshift(@fnames, unshift(@fnames,
"$global_mandatory_dir/sysprefs.sql",
"$global_mandatory_dir/subtag_registry.sql", "$global_mandatory_dir/subtag_registry.sql",
"$global_mandatory_dir/auth_val_cat.sql", "$global_mandatory_dir/auth_val_cat.sql",
"$global_mandatory_dir/message_transport_types.sql", "$global_mandatory_dir/message_transport_types.sql",
@ -341,12 +341,13 @@ sub load_sql_in_order {
"$global_mandatory_dir/keyboard_shortcuts.sql", "$global_mandatory_dir/keyboard_shortcuts.sql",
); );
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/userflags.sql"; push @fnames, "$global_mandatory_dir/userflags.sql",
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/userpermissions.sql"; "$global_mandatory_dir/userpermissions.sql",
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/audio_alerts.sql"; "$global_mandatory_dir/audio_alerts.sql",
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_offset_types.sql"; "$global_mandatory_dir/account_offset_types.sql",
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_credit_types.sql"; "$global_mandatory_dir/account_credit_types.sql",
push @fnames, C4::Context->config('intranetdir') . "/installer/data/mysql/account_debit_types.sql"; "$global_mandatory_dir/account_debit_types.sql",
;
my $localization_file = C4::Context->config('intranetdir') . my $localization_file = C4::Context->config('intranetdir') .
"/installer/data/$self->{dbms}/localization/$langchoice/custom.sql"; "/installer/data/$self->{dbms}/localization/$langchoice/custom.sql";
if ( $langchoice ne 'en' and -f $localization_file ) { if ( $langchoice ne 'en' and -f $localization_file ) {

0
installer/data/mysql/mandatory/subtag_registry.sql Executable file → Normal file
View file