Browse Source
Behave like the statistics table and don't remove the code even if the branch or patron's category is removed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>21.11/bug30761
2 changed files with 18 additions and 4 deletions
@ -0,0 +1,17 @@ |
|||
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 |
|||
}); |
|||
} |
|||
} |
|||
}, |
|||
} |
Loading…
Reference in new issue