[Bug 35473] New: Core bookings and room reservations plugin tables clash
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Bug ID: 35473 Summary: Core bookings and room reservations plugin tables clash Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Some early 23.11 adopters have spotted that the rooms reservations plugin already adds a 'bookings' table (without any form of table qualification which is modern best practice). We'll want to try and identify when this is the case and migrate the table. I'll contact the authors for the original plugin to discuss the next steps.. but there's lots of forks of this particular plugin so we'll want to somehow highlight issues to end users too. -- 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=35473 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- 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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 [Bug 29002] Add ability to book items ahead of time -- 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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major -- 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=35473 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The plugin has now been updated to prevent the conflict, however we still need to fix the database update -- 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=35473 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 160827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160827&action=edit Bug 35473: Handle room reservations plugin conflict We now look for the existance of the room reservations 'bookings' table prior to attempting to install the core bookings table and migrate it in the same way the upstream plugin does before proceeding with installing the core bookings 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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=35473 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Kyle.. I think we'll need an additional check in the plugin side to look for whether the table has already been migrated prior to upgrade (i.e check that the bookings table has booking_id vs bookingid column.) I'm also tempted to add a 'disable' call into here to disable the room reservations plugin if found to ensure people go and upgrade it prior trying to use it again. -- 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=35473 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160827|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 160879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160879&action=edit Bug 35473: Handle room reservations plugin conflict We now look for the existance of the room reservations 'bookings' table prior to attempting to install the core bookings table and migrate it in the same way the upstream plugin does before proceeding with installing the core bookings tables. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- 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=35473 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #3)
Kyle.. I think we'll need an additional check in the plugin side to look for whether the table has already been migrated prior to upgrade (i.e check that the bookings table has booking_id vs bookingid column.)
I'm also tempted to add a 'disable' call into here to disable the room reservations plugin if found to ensure people go and upgrade it prior trying to use it again.
Sounds like a good plan to me! -- 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=35473 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161043&action=edit Bug 35473: Also disable the plugin -- 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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- 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=35473 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmpinpin.cca@gmail.com --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 35697 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- WARN installer/data/mysql/db_revs/230600061.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 0, now: 11) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160879|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161742 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161742&action=edit Bug 35473: Handle room reservations plugin conflict We now look for the existance of the room reservations 'bookings' table prior to attempting to install the core bookings table and migrate it in the same way the upstream plugin does before proceeding with installing the core bookings tables. 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=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161043|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 161743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161743&action=edit Bug 35473: Also disable the plugin -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tidied.. again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm getting a bit tired of a tiny tidy requirement simply because master moved stopping a bug in it's tracks :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is a pretty darn critical bug for upgrades that can completely break Koha.. amazing it doesn't get any attention -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #13)
This is a pretty darn critical bug for upgrades that can completely break Koha.. amazing it doesn't get any attention
Will have a look now. But you know about 34478 ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This is an interesting patch. I tend to think that we should not touch the tables of a plugin. And just abort here? But that may be a bit too formal response? I like to have bit more feedback from QA. Moving to ID and sending a mail. Do we choose for Pragmatic here and just move the tables, or do we choose to just bail out and let the plugin stuff be handled outside Koha? Note that the question also arises: What should we do for other plugins in the future that created tables in Koha and clash? I would normally not expect Koha to contain knowledge about plugin tables? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Marcel de Rooy from comment #15)
Note that the question also arises: What should we do for other plugins in the future that created tables in Koha and clash? I would normally not expect Koha to contain knowledge about plugin tables?
I think we should try to avoid using table names that are already used by known plugins, but if that happens (like in this bug) I think it's the plugin responsibility to move its own data. Now what should Koha do ? Stop the update process, and if the plugin is known add a message suggesting to update the plugin first ? Can the plugin update be done in the middle of the updatedb process ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #17 from Jonathan Druart <jonathan.druart@gmail.com> --- On bug 30650 (Curbside pickups) I took care of the plugin's data (the idea was to provide the same feature as the plugin). The patch created the same tables as the plugin, then adjusted the structure to reach the new one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hmm, it does raise a fiar question. In this case I worked with the plugin maintainers to get both sides of the equation done.. so, with this patch we don't just explode badly and you cna upgrade the plugin either before or after the upgrade and it works. Withouth this patch, if you don't happen to know you need to upgrade the plugin first, you'll end up with a nasty silent failure during upgrade which, without some code that's very much aware of the plugin table layout isn't at all easy to spot. I'm open to suggestions of course, but I couldn't see an alternative. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Plugins should always use: my $table_name = $self->get_qualified_table_name('name_you_want'); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Do we have a proposed path forward here.. as it stands Koha just breaks silently at upgrade if room reservations was installed.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #20)
Do we have a proposed path forward here.. as it stands Koha just breaks silently at upgrade if room reservations was installed..
IMO Koha continuing to function should trump all other things. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we have the best possible outcome here that will allow libraries to fix the issue without losing data. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161742|0 |1 is obsolete| | --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 163159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163159&action=edit Bug 35473: Handle room reservations plugin conflict We now look for the existance of the room reservations 'bookings' table prior to attempting to install the core bookings table and migrate it in the same way the upstream plugin does before proceeding with installing the core bookings tables. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161743|0 |1 is obsolete| | --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 163160 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163160&action=edit Bug 35473: Also disable the plugin Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #22)
I think we have the best possible outcome here that will allow libraries to fix the issue without losing data.
No, I would not completely agree here. Certainly not the best possible outcome. I tend to allow it but it creates precedence for mixing specific plugin details and our codebase. Which is actually not nice. Theoretically, we should just abort the upgrade and leave plugin fixing to plugin support. But feeling the pressure (..) we might make yet another exception here :) Passing QA QA team: Please dont make such db revs. And dont allow them in the future ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #21)
IMO Koha continuing to function should trump all other things.
The verb trump makes me think of someone :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 --- Comment #27 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I believe the thinking was that if you are in the middle of an upgrade already, it's easier to make it continue and fix the plugin later from GUI. I can see that fixing "before" update could be another route. I DO hope that we won't run into more issues like this, but one can only hope. Should we adjust our checks for existing tables somehow? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.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=35473 --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.04 released in| | --- Comment #29 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |lucas@bywatersolutions.com Resolution|--- |FIXED --- Comment #30 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 23.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36424 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36424 [Bug 36424] Database update 23.06.00.061 breaks due to syntax error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35473 Bug 35473 depends on bug 29002, which changed state. Bug 29002 Summary: Add ability to book items ahead of time https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29002 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org