[Bug 23066] New: Add foreign key for issues tables to branches table for branchcodes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Bug ID: 23066 Summary: Add foreign key for issues tables to branches table for branchcodes Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- We should really have foreign key constrains between the branches table and the issues and old_issues tables. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 90372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90372&action=edit Bug 23066: Add foreign key for issues tables to branches table for branchcodes - Update DB We should really have foreign key constrains between the branches table and the issues and old_issues tables. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15985 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15985 [Bug 15985] Include transacting library in fines -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90372|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 90373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90373&action=edit Bug 23066: Add foreign key for issues tables to branches table for branchcodes - Update DB We should really have foreign key constrains between the branches table and the issues and old_issues tables. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90373|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 90374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90374&action=edit Bug 23066: Add foreign key for issues tables to branches table for branchcodes - Update DB We should really have foreign key constrains between the branches table and the issues and old_issues tables. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle, should this be NSO? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- This makes me so happy. I was just about to report this, so I'm glad to see the issue and a patch. I'm in a rush at the moment, but I'll make a note to come back to this to test and sign off. (I wish that there were an alternative to "SET NULL" for old_issues, but I don't think there is with our current architecture.) A library of ours got bitten by this. They moved their items to a new branch, deleted the old branch, but their issues are all for the old non-existent branch. I took a little look around and it seems like these might be the only relevant tables missing the foreign key relationship to the branches table. Once again, thanks Kyle! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90374|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 92167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92167&action=edit Bug 23066: Add foreign key for issues tables to branches table for branchcodes - Update DB We should really have foreign key constrains between the branches table and the issues and old_issues tables. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Database |and plumbing | Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion CC| |m.de.rooy@rijksmuseum.nl --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please send a mail to the list asking for further feedback from the community before adding this constraint. It is obvious at first sight, but why didn't we add it years ago then? Anything to do with keeping the old branchcode in old issue records or so? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Marcel de Rooy from comment #7)
Please send a mail to the list asking for further feedback from the community before adding this constraint. It is obvious at first sight, but why didn't we add it years ago then? Anything to do with keeping the old branchcode in old issue records or so?
A search of git suggests it might have just been an oversight? In master kohastructure.sql we see the following for the branchcode column: `branchcode` varchar(10) default NULL, -- foreign key, linking to the branches table for the location the item was checked out However, there is no foreign key. It appears the comment was added by commit 91b5a09c6ce (Sun Aug 2011) but even then there was no foreign key there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23066 Bug 23066 depends on bug 15985, which changed state. Bug 15985 Summary: Include checkout library in fines https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15985 What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org