Browse Source

Bug 27069: DBRev 20.12.00.027

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
master
Jonathan Druart 3 days ago
parent
commit
4bfc2584e0
3 changed files with 19 additions and 18 deletions
  1. +1
    -1
      Koha.pm
  2. +0
    -17
      installer/data/mysql/atomicupdate/bug_27069.perl
  3. +18
    -0
      installer/data/mysql/updatedatabase.pl

+ 1
- 1
Koha.pm View File

@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #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
# and is automatically called by Auth.pm when needed.
$VERSION = "20.12.00.026";
$VERSION = "20.12.00.027";

sub version {
return $VERSION;


+ 0
- 17
installer/data/mysql/atomicupdate/bug_27069.perl View File

@@ -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
- 0
installer/data/mysql/updatedatabase.pl View File

@@ -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");
}

$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
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';


Loading…
Cancel
Save