[Bug 30472] New: Field borrower_relationships.guarantor_id should be marked as NOT NULL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Bug ID: 30472 Summary: Field borrower_relationships.guarantor_id should be marked as NOT NULL Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Database Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org See also $DBversion = '19.06.00.022'; CREATE TABLE `borrower_relationships` [...] guarantor_id INT(11) NOT NULL, guarantee_id INT(11) NOT NULL, Many production db's will have both fields already NOT NULL. We need to adjust kohastructure and DBIx Note that non-patron guarantors are NOT saved in this table but in the borrowers table itself IIUC. -- 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=30472 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30486 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30486 [Bug 30486] [OMNIBUS] Synchronize database schema with (older) database revisions -- 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=30472 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial 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=30472 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139711&action=edit Bug 30472: Make borrower_relationships.guarantor_id not null In harmony with dbrev 19.06.00.022. Test plan: Run dbrev. Run t/db_dependent/Patron/Relationships.t Run t/db_dependent/Koha/Patrons.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=30472 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Trivial, architectural (db admin). Self signoff. -- 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=30472 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |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=30472 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |trivial -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- RM: Take care of DBIx please. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Fridolin Somers <fridolin.somers@biblibre.com> 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=30472 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139711|0 |1 is obsolete| | --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 139972 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139972&action=edit Bug 30472: Make borrower_relationships.guarantor_id not null In harmony with dbrev 19.06.00.022. Test plan: Run dbrev. Run t/db_dependent/Patron/Relationships.t Run t/db_dependent/Koha/Patrons.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |14570 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14570 [Bug 14570] Make it possible to add multiple guarantors to a record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Makes perfect sens. Generated DBIx looks OK. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Fridolin Somers from comment #4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Pablo AB <pablo.bianchi@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pablo.bianchi@gmail.com --- Comment #8 from Pablo AB <pablo.bianchi@gmail.com> --- Upgrading to 22.11.02-1 from an updated 22.05 on a Debian 11: Upgrade to 22.06.00.048 [18:33:27]: Bug 30472 - borrower_relationships.guarantor_id NOT NULL ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'guarantor_id': used in a foreign key constraint 'r_guarantor' at /usr/share/koha/lib/C4/Installer.pm line 739 Maybe the same issue as on bug 32399? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Mona Panchaud <m+koha@mpan.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m+koha@mpan.ch --- Comment #9 from Mona Panchaud <m+koha@mpan.ch> --- Hello. While upgrading from 22.05 to 22.11 we are running into the following problem that is related to this change: "Upgrade to 22.06.00.048 [20:19:53]: Bug 30472 - borrower_relationships.guarantor_id NOT NULL ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'guarantor_id': used in a foreign key constraint 'r_guarantor' at /usr/share/koha/lib/C4/Installer.pm line 743" Is there any workaround? What can we do to get the upgrade working? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33671 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33671 [Bug 33671] Database update 22.06.00.048 breaks when there are borrower_relationships.guarantor_id with NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30472 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Mona, hi Pablo, I've moved the problem into a new bug: bug 33671. What you can do: could you check if you have NULL values in borrower_relationships.guarantor_id? Also, which DBMS are you using and what is the version? (MariaDB or MySQL, check the about page in Koha) Please add info to bug 33671. Thx! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org