Browse Source

Bug 27069: DBRev 20.12.00.027

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Jonathan Druart 3 years ago
parent
commit
4bfc2584e0
  1. 2
      Koha.pm
  2. 17
      installer/data/mysql/atomicupdate/bug_27069.perl
  3. 18
      installer/data/mysql/updatedatabase.pl

2
Koha.pm

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion. # - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself # used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed. # and is automatically called by Auth.pm when needed.
$VERSION = "20.12.00.026"; $VERSION = "20.12.00.027";
sub version { sub version {
return $VERSION; return $VERSION;

17
installer/data/mysql/atomicupdate/bug_27069.perl

@ -1,17 +0,0 @@
$DBversion = 'XXX';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
UPDATE circulation_rules
SET
rule_value = CASE
WHEN rule_value='0' THEN 'not_allowed'
WHEN rule_value='1' THEN 'from_home_library'
WHEN rule_value='2' THEN 'from_any_library'
WHEN rule_value='3' THEN 'from_local_hold_group'
END
WHERE rule_name='holdallowed' AND rule_value >= 0 AND rule_value <= 3;
});
NewVersion( $DBversion, 27069, "Change holdallowed values from numbers to strings");
}

18
installer/data/mysql/updatedatabase.pl

@ -23749,6 +23749,24 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, 26498, "Bug 26498 - Add option to set a default expire date for holds at reservation time"); NewVersion( $DBversion, 26498, "Bug 26498 - Add option to set a default expire date for holds at reservation time");
} }
$DBversion = '20.12.00.027';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
UPDATE circulation_rules
SET
rule_value = CASE
WHEN rule_value='0' THEN 'not_allowed'
WHEN rule_value='1' THEN 'from_home_library'
WHEN rule_value='2' THEN 'from_any_library'
WHEN rule_value='3' THEN 'from_local_hold_group'
END
WHERE rule_name='holdallowed' AND rule_value >= 0 AND rule_value <= 3;
});
NewVersion( $DBversion, 27069, "Change holdallowed values from numbers to strings");
}
# SEE bug 13068 # SEE bug 13068
# if there is anything in the atomicupdate, read and execute it. # if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';

Loading…
Cancel
Save