From Bug 15630: t/db_dependent/TestBuilder.t .. 3/41 DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_empty`.`edifact_messages`, CONSTRAINT `emfk_basketno` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`)) [for Statement "DELETE FROM `aqbasket` WHERE ( `basketno` = ? )" with ParamValues: 0='13'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1834. the foreign keys don't not have a ON * CASCADE clause.
Created attachment 50723 [details] [review] Bug 16354 - TestBuilder.t fails due to key constraints Test Plan: 1) prove t/db_dependent/TestBuilder.t 2) Note failure 3) Apply this patch 4) prove t/db_dependent/TestBuilder.t 5) Tests should now pass!
Created attachment 50735 [details] [review] [SIGNED-OFF] Bug 16354 - TestBuilder.t fails due to key constraints Test Plan: 1) prove t/db_dependent/TestBuilder.t 2) Note failure 3) Apply this patch 4) prove t/db_dependent/TestBuilder.t 5) Tests should now pass! Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Failure noted and corrected. No errors
Created attachment 50763 [details] [review] [PASSED QA] Bug 16354 - TestBuilder.t fails due to key constraints Test Plan: 1) prove t/db_dependent/TestBuilder.t 2) Note failure 3) Apply this patch 4) prove t/db_dependent/TestBuilder.t 5) Tests should now pass! Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Failure noted and corrected. No errors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 Release. Thanks!
(In reply to Brendan Gallagher from comment #4) > Pushed to Master - Should be in the May 2016 Release. Thanks! (In reply to Brendan Gallagher from comment #4) > Pushed to Master - Should be in the May 2016 Release. Thanks! Hi Brendan, I have a failure in updatedatabase here, perhaps each sentence neeeds it's own $dbh->do $dbh->do(q{ ALTER TABLE edifact_messages DROP FOREIGN KEY emfk_vendor, DROP FOREIGN KEY emfk_edi_acct, DROP FOREIGN KEY emfk_basketno; }); $dbh->do(q{ ALTER TABLE edifact_messages ADD CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE; });
Not needed in stable version, status changed to RESOLVED