Bug 29341: DBRev 20.11.11.002

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c2430c6ee0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Kyle Hall 2021-11-19 11:52:54 -05:00 committed by Fridolin Somers
parent aa2ec37ce1
commit 6fb901ac87
3 changed files with 13 additions and 18 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.11.11.001";
$VERSION = "20.11.11.002";
sub version {
return $VERSION;

View File

@ -1,17 +0,0 @@
use Modern::Perl;
return {
bug_number => "29341",
description => "Remove foreign keys on pseudonymized_transactions",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
for my $fk ( qw( pseudonymized_transactions_borrowers_ibfk_2 pseudonymized_transactions_borrowers_ibfk_3 pseudonymized_transactions_ibfk_1 ) ) {
if ( foreign_key_exists( 'pseudonymized_transactions', $fk ) ) {
$dbh->do(qq{
ALTER TABLE pseudonymized_transactions DROP FOREIGN KEY $fk
});
}
}
},
}

View File

@ -23725,6 +23725,18 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, "29386", "Extend background_jobs.data to LONGTEXT" );
}
$DBversion = '20.11.11.002';
if( CheckVersion( $DBversion ) ) {
for my $fk ( qw( pseudonymized_transactions_borrowers_ibfk_2 pseudonymized_transactions_borrowers_ibfk_3 pseudonymized_transactions_ibfk_1 ) ) {
if ( foreign_key_exists( 'pseudonymized_transactions', $fk ) ) {
$dbh->do(qq{
ALTER TABLE pseudonymized_transactions DROP FOREIGN KEY $fk
});
}
}
NewVersion( $DBversion, "29341", "Remove foreign keys on pseudonymized_transactions" );
}
# 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/';