https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33671 --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Pablo please try these statements manually (copied from dbrev): ALTER TABLE borrower_relationships DROP FOREIGN KEY `r_guarantor`; DELETE borrower_relationships FROM borrower_relationships LEFT JOIN borrowers bo ON bo.borrowernumber=guarantor_id WHERE guarantor_id IS NULL OR bo.borrowernumber IS NULL; ALTER TABLE borrower_relationships CHANGE COLUMN guarantor_id guarantor_id int(11) NOT NULL; ALTER TABLE borrower_relationships ADD FOREIGN KEY `r_guarantor` (guarantor_id) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE; -- You are receiving this mail because: You are watching all bug changes.