5 description => "Recreate old_reserves_ibfk_4 if cascading",
8 my ($dbh, $out) = @$args{qw(dbh out)};
10 my @info = $dbh->selectrow_array( q|SHOW CREATE TABLE old_reserves| );
11 if( $info[1] =~ /^\s*CONSTRAINT .old_reserves_ibfk_4.*CASCADE$/m ) {
12 $dbh->do( q|ALTER TABLE old_reserves DROP FOREIGN KEY old_reserves_ibfk_4| );
13 $dbh->do( q|ALTER TABLE old_reserves ADD FOREIGN KEY old_reserves_ibfk_4 (itemtype) REFERENCES itemtypes (itemtype) ON DELETE SET NULL ON UPDATE SET NULL| );