Browse Source

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>
20.11.x
Jonathan Druart 4 years ago
parent
commit
a15a7f5d81
  1. 15
      C4/Installer.pm
  2. 0
      installer/data/mysql/mandatory/account_credit_types.sql
  3. 0
      installer/data/mysql/mandatory/account_debit_types.sql
  4. 0
      installer/data/mysql/mandatory/account_offset_types.sql
  5. 0
      installer/data/mysql/mandatory/audio_alerts.sql
  6. 0
      installer/data/mysql/mandatory/subtag_registry.sql
  7. 0
      installer/data/mysql/mandatory/sysprefs.sql
  8. 0
      installer/data/mysql/mandatory/userflags.sql
  9. 0
      installer/data/mysql/mandatory/userpermissions.sql

15
C4/Installer.pm

@ -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/account_credit_types.sql → installer/data/mysql/mandatory/account_credit_types.sql

0
installer/data/mysql/account_debit_types.sql → installer/data/mysql/mandatory/account_debit_types.sql

0
installer/data/mysql/account_offset_types.sql → installer/data/mysql/mandatory/account_offset_types.sql

0
installer/data/mysql/audio_alerts.sql → installer/data/mysql/mandatory/audio_alerts.sql

0
installer/data/mysql/mandatory/subtag_registry.sql

0
installer/data/mysql/sysprefs.sql → installer/data/mysql/mandatory/sysprefs.sql

0
installer/data/mysql/userflags.sql → installer/data/mysql/mandatory/userflags.sql

0
installer/data/mysql/userpermissions.sql → installer/data/mysql/mandatory/userpermissions.sql

Loading…
Cancel
Save