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

--- Comment #3 from Manos PETRIDIS <egpetri...@yahoo.com> ---
I'm running mariadb 1:10.4.17+maria~stretch on Debian GNU/Linux 9.12 (stretch)
with Linux 4.9.0-14-amd64 kernel. Pretty standard I understand.

'UPDATE message_transport_types SET message_transport_type = "asdf" WHERE
message_transport_type = "email"' comes up with: 
08:45:26 Kernel error: Error( 1451 ) 23000: "Cannot delete or update a parent
row: a foreign key constraint fails (`koha_usmarc`.`letter`, CONSTRAINT
`message_transport_type_fk` FOREIGN KEY (`message_transport_type`) REFERENCES
`message_transport_types` (`message_transport_type`))"


...while 'SHOW CREATE TABLE letter' produces:
INSERT INTO ``(
    `Table`,
    `Create Table`
) VALUES (
    'letter',
    'CREATE TABLE `letter` (
  `module` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''',
  `code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''',
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''',
  `is_html` tinyint(1) DEFAULT 0,
  `title` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '''',
  `content` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `message_transport_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL
DEFAULT ''email'',
  `lang` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''default'',
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp(),
  PRIMARY KEY (`module`,`code`,`branchcode`,`message_transport_type`,`lang`),
  KEY `message_transport_type_fk` (`message_transport_type`),
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
REFERENCES `message_transport_types` (`message_transport_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci'
 );

When were these FK and CONSTRAINT introduced in the database? In my case,
upgrade steps begun with 'Upgrade to 20.06.00.023', therefore I gather that
they were not [both] present at 20.06.00.022.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to