19 lines
602 B
Perl
Executable file
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'";
|
|
}
|
|
},
|
|
};
|