[Bug 17813] New: Table borrower_attributes needs a primary key
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Bug ID: 17813 Summary: Table borrower_attributes needs a primary key Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org In order to be used correctly on DBIC the table needs a primary key. Otherwise calls to ->delete would fail. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17792 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17792 [Bug 17792] Introduce Koha::Patron::Attribute(s) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58422&action=edit Bug 17813: Add a primary key to borrower_attributes This patch adds 'borrower_attributes' a field (if) which will act as a primary key. This is needed for DBIC to be used to handle rows, and also will help when faced with the implementation of the REST api for this resource. To test: - Run all patron modification / attributes and verify nothing breaks - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58423&action=edit Bug 17813: DBIC update -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58422|0 |1 is obsolete| | Attachment #58423|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 58493 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58493&action=edit Bug 17813: Add a primary key to borrower_attributes This patch adds 'borrower_attributes' a field (if) which will act as a primary key. This is needed for DBIC to be used to handle rows, and also will help when faced with the implementation of the REST api for this resource. To test: - Run all patron modification / attributes and verify nothing breaks - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 58494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58494&action=edit Bug 17813: DBIC update Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think we need to provide a version using column_exists, from bug 17234. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 58879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58879&action=edit Bug 17813: (QA followup) Properly check DB structure before altering it This patch makes the atomic update use the new functions introduced by bug 17234 for checking the structure before attempting to call ALTER TABLE. It checks for the column existence, and also if it is a primary key. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14187 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14187 [Bug 14187] branchtransfer needs a primary key (id) for DBIx and common sense. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17234 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17234 [Bug 17234] ALTER IGNORE TABLE is invalid in mysql 5.7. This breaks updatedatabase.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14187 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14187 [Bug 14187] branchtransfer needs a primary key (id) for DBIx and common sense. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58493|0 |1 is obsolete| | Attachment #58494|0 |1 is obsolete| | Attachment #58879|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59070&action=edit Bug 17813: Add a primary key to borrower_attributes This patch adds 'borrower_attributes' a field (if) which will act as a primary key. This is needed for DBIC to be used to handle rows, and also will help when faced with the implementation of the REST api for this resource. To test: - Run all patron modification / attributes and verify nothing breaks - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59071&action=edit Bug 17813: DBIC update Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 59072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59072&action=edit Bug 17813: (QA followup) Properly check DB structure before altering it This patch makes the atomic update use the new functions introduced by bug 17234 for checking the structure before attempting to call ALTER TABLE. It checks for the column existence, and also if it is a primary key. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Resolution|--- |FIXED CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |RESOLVED --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have changed this to 'enh' as I think while it's needed to move forward it's not fixing a bug at the moment (false testable behaviour). Not including this in 16.11.2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Just wondering - why don't we replace the old for the new variable in the notices with SQL? I think we have done that once when we added the new syntax for <<items.fine>> already. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #12)
Just wondering - why don't we replace the old for the new variable in the notices with SQL? I think we have done that once when we added the new syntax for <<items.fine>> already.
There is no old column, only a new one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17813 Bug 17813 depends on bug 17234, which changed state. Bug 17234 Summary: ALTER IGNORE TABLE is invalid in mysql 5.7. This breaks updatedatabase.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17234 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org