[Koha-bugs] [Bug 22008] Missing constraints on accountlines

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 26 20:21:06 CET 2019


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

--- Comment #18 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 85614
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85614
Bug 22008: Add missing constraints to accountlines

Review of attachment 85614:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=22008&attachment=85614)
-----------------------------------------------------------------

Replace NOT IN with LEFT JOIN... NOT NULL?

::: installer/data/mysql/atomicupdate/bug_22008.perl
@@ +14,5 @@
> +        $dbh->do("ALTER TABLE accountlines ADD CONSTRAINT `accountlines_ibfk_issues` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`issue_id`) ON DELETE SET NULL ON UPDATE CASCADE");
> +    }
> +
> +    # Rename accountlines_ibfk_2 to accountlines_ibfk_items
> +    if( foreign_key_exists( 'accountlines', 'accountlines_ibfk_2' ) ) {

You should test for accountlines_ibfk_items as well.

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


More information about the Koha-bugs mailing list