[Koha-bugs] [Bug 34276] upgrading 23.05 to 23.05.002
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Sep 1 08:36:13 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34276
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |m.de.rooy at rijksmuseum.nl
--- Comment #35 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Note this change on bug 29390 (waiting in NSO since June):
sub foreign_key_exists {
- my ( $table_name, $constraint_name ) = @_;
+ my ( $table_name, $constraint_name, $field_name ) = @_;
my $dbh = C4::Context->dbh;
my (undef, $infos) = $dbh->selectrow_array(qq|SHOW CREATE TABLE
$table_name|);
- return $infos =~ m|CONSTRAINT `$constraint_name` FOREIGN KEY|;
+ return $infos =~ m|CONSTRAINT `$constraint_name` FOREIGN KEY| if
$constraint_name;
+ return $infos =~ m|FOREIGN KEY \(`$field_name`\)| if $field_name;
}
This allows me to check for a FK without the specific constraint name..
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list