Koha/installer/data/mysql/db_revs/210600048.pl
Jonathan Druart 8a280a7d54 Bug 29341: DBRev 21.06.00.048
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-11-19 15:23:27 +01:00

17 lines
607 B
Perl
Executable file

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
});
}
}
},
}