[Koha-bugs] [Bug 27534] koha upgrade throws SQL error while applying Bug 25333 - Change message transport type for Talking Tech from "phone" to "itiva"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 1 00:21:05 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27534

--- Comment #8 from Manos PETRIDIS <egpetridis at yahoo.com> ---
I don't think that I can test the patch Jonathan, as I'm not running a git
installation, but one based on koha packages. 

I can report though that the mere addition of "ON DELETE CASCADE ON UPDATE
CASCADE" won't do he trick in an existing db, as it comes up with Kernel error:
Error( 1005 ) HY000: "Can't create table `koha_usmarc`.`letter` (errno: 121
"Duplicate key on write or update")"

What I have done is first
  ALTER TABLE letter drop CONSTRAINT message_transport_type_fk 

01:12:50 Query time: 91 millisecond(s)
01:12:50 Query has been executed


and then 
  ALTER TABLE letter ADD CONSTRAINT message_transport_type_fk FOREIGN KEY
(message_transport_type) REFERENCES
message_transport_types(message_transport_type) ON DELETE CASCADE ON UPDATE
CASCADE

01:13:21 Query time: 518 millisecond(s), Number of affected records: 62
01:13:21 Number of affected rows: 62


Having done that, the failing update now works fine
  UPDATE message_transport_types SET message_transport_type = "asdf" WHERE
message_transport_type = "email"

01:13:51 Query time: 223 millisecond(s), Number of affected records: 1
01:13:51 Number of affected rows: 1
01:13:51 UPDATE message_transport_types SET message_transport_type = "asdf"
WHERE message_transport_type = "email"

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list