Koha/installer/data/mysql/db_revs/221200026.pl
Tomas Cohen Arazi 95520f0fb5
Bug 22440: DBRev 22.12.00.026
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-05 09:13:44 -03:00

19 lines
602 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "22440",
description => "Add new /ill_requests endopoint",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
if ( foreign_key_exists( 'illrequests', 'illrequests_bibfk' ) ) {
$dbh->do(q{
ALTER TABLE illrequests
ADD FOREIGN KEY illrequests_bibfk (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE;
});
say $out "Added foreign key constraint 'illrequests.illrequests_bibfk'";
}
},
};