[Bug 14978] New: issues.itemnumber should be a unique key
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Bug ID: 14978 Summary: issues.itemnumber should be a unique key Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 14069 Bug 14069 removed existing primary key on issues without questioning why one could exist. Note that the primary key was not in the kohastructure.sql and only existed on old DB. issues.itemnumber should be a unique key to avoid duplication of issues on the same item. Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14069 [Bug 14069] Follow-up 13790: Fix database update to drop PK on issues/old_issues first -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43219 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43219&action=edit Bug 14978: Add unique key constraint on issues.itemnumber The constraint might have existed before bug 14069. For these DB, this patch will restore it, for others, it will add it :) Test plan:
show create table issues; should not return "unique key itemnumber" Execute the updatedb entry twice show create table issues; should return only one "unique key itemnumber"
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43219|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 43342 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43342&action=edit Bug 14978: Add unique key constraint on issues.itemnumber The constraint might have existed before bug 14069. For these DB, this patch will restore it, for others, it will add it :) Test plan:
show create table issues; should not return "unique key itemnumber" Execute the updatedb entry twice show create table issues; should return only one "unique key itemnumber"
Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43342|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44246 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44246&action=edit [PASSED QA] Bug 14978: Add unique key constraint on issues.itemnumber The constraint might have existed before bug 14069. For these DB, this patch will restore it, for others, it will add it :) Test plan:
show create table issues; should not return "unique key itemnumber" Execute the updatedb entry twice show create table issues; should return only one "unique key itemnumber"
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- Does this patch need to be backported to 3.20.x? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Frédéric Demians from comment #5)
Does this patch need to be backported to 3.20.x?
As bug 14069 is in 3.20.x I would say yes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.7. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Do we need to change the database update statements in later versions now to avoid errors/warnings? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ah, I see it already includes a check for existence - so should be safe :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14978 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15462 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15462 [Bug 15462] Unable to renew books via circ/renew.pl -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org