Bug 25596: DBRev 20.06.00.054

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-10-25 23:12:15 +00:00
parent e3183de77b
commit 3a5d5367f1
3 changed files with 27 additions and 26 deletions

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.06.00.053";
$VERSION = "20.06.00.054";
sub version {
return $VERSION;

View File

@ -1,25 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if ( CheckVersion($DBversion) ) {
$dbh->do(
qq{
INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system)
VALUES
('OVERPAYMENT', 'Overpayment refund', 0, 1)
}
);
$dbh->do(
qq{
INSERT IGNORE INTO account_offset_types ( type ) VALUES ('Overpayment');
}
);
$dbh->do(
qq{
UPDATE accountlines SET credit_type_code = 'OVERPAYMENT' WHERE credit_type_code = 'CREDIT' AND description = 'Overpayment refund'
}
);
NewVersion( $DBversion, 25596, "Add OVERPAYMENT credit type" );
}

View File

@ -23081,6 +23081,32 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, 26569, "Use gender neutral pronouns in system preference explanations" );
}
$DBversion = '20.06.00.054';
if ( CheckVersion($DBversion) ) {
$dbh->do(
qq{
INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system)
VALUES
('OVERPAYMENT', 'Overpayment refund', 0, 1)
}
);
$dbh->do(
qq{
INSERT IGNORE INTO account_offset_types ( type ) VALUES ('Overpayment');
}
);
$dbh->do(
qq{
UPDATE accountlines SET credit_type_code = 'OVERPAYMENT' WHERE credit_type_code = 'CREDIT' AND description = 'Overpayment refund'
}
);
NewVersion( $DBversion, 25596, "Add OVERPAYMENT credit type" );
}
# 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/';