[Bug 17292] New: Use of DBIx in updatedatabase.pl broke upgrade ( from bug 8956)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Bug ID: 17292 Summary: Use of DBIx in updatedatabase.pl broke upgrade (from bug 8956) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@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=17292 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |8956 Assignee|gmcharlt@gmail.com |kyle.m.hall@gmail.com --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- A recent change in the 'subscription' table structure highlighted a problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the subscription.itemtype column to exist. But it is not created until DBRev 16.06.00.025. To reproduce: - Have a clean 3.20.00 DB loaded into kohadevbox - Checkout current master - Run: $ perl installer/data/mysql/updatedatabase.pl => FAIL: The upgrade procedure fails due to missing colum. The solution: rewrite the updatedatabase.pl entry using plain DBI. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8956 [Bug 8956] Split serials enumeration data into separate fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 55502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55502&action=edit Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade A recent change in the 'subscription' table structure highlighted a problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the subscription.itemtype column to exist. But it is not created until DBRev 16.06.00.025. To reproduce: - Have a clean 3.20.00 DB loaded into kohadevbox - Checkout current master - Run: $ perl installer/data/mysql/updatedatabase.pl => FAIL: The upgrade procedure fails due to missing colum. The solution: rewrite the updatedatabase.pl entry using plain DBI -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Use of DBIx in |Use of DBIx in |updatedatabase.pl broke |updatedatabase.pl broke |upgrade (from bug 8956) |upgrade (from bug 12375) CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |12375 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12375 [Bug 12375] Store serials enumeration data in separate fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 55672 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55672&action=edit Bug 17292: Follow up - tweak to make it pass cleaner remove a 'my' next if not defined subscriptions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55502|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 55673 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55673&action=edit Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade A recent change in the 'subscription' table structure highlighted a problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the subscription.itemtype column to exist. But it is not created until DBRev 16.06.00.025. To reproduce: - Have a clean 3.20.00 DB loaded into kohadevbox - Checkout current master - Run: $ perl installer/data/mysql/updatedatabase.pl => FAIL: The upgrade procedure fails due to missing colum. The solution: rewrite the updatedatabase.pl entry using plain DBI Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55672|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 55674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55674&action=edit Bug 17292: Follow up - tweak to make it pass cleaner remove a 'my' next if not defined subscriptions. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtompset@hotmail.com --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Setting to signed off, unless QA folks think my follow up really needs lots of testing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- *** Bug 17313 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=17292 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17324 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 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=17292 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55673|0 |1 is obsolete| | Attachment #55674|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55861 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55861&action=edit Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade A recent change in the 'subscription' table structure highlighted a problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the subscription.itemtype column to exist. But it is not created until DBRev 16.06.00.025. To reproduce: - Have a clean 3.20.00 DB loaded into kohadevbox - Checkout current master - Run: $ perl installer/data/mysql/updatedatabase.pl => FAIL: The upgrade procedure fails due to missing colum. The solution: rewrite the updatedatabase.pl entry using plain DBI Signed-off-by: Mark Tompsett <mtompset@hotmail.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=17292 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55862&action=edit Bug 17292: Follow up - tweak to make it pass cleaner remove a 'my' next if not defined subscriptions. Signed-off-by: Mark Tompsett <mtompset@hotmail.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=17292 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November Release 16.11 - Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #11 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 56734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56734&action=edit Bug 17292 Follow-up, fix typos - wrong assignation - reference to 'serials' table rather than 'serial' Signed-off-by: Frédéric Demians <f.demians@tamil.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- Note to RM: This follow-up is required for 16.05, but also for master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Frédéric Demians from comment #13)
Note to RM: This follow-up is required for 16.05, but also for master.
Ping RM! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Frédéric Demians from comment #12)
Created attachment 56734 [details] [review] Bug 17292 Follow-up, fix typos
- wrong assignation - reference to 'serials' table rather than 'serial'
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
We need that one for the 16.11 package as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Ian Palko <library@stas.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |library@stas.org --- Comment #16 from Ian Palko <library@stas.org> --- (In reply to Jonathan Druart from comment #15)
(In reply to Frédéric Demians from comment #12)
Created attachment 56734 [details] [review] [review] Bug 17292 Follow-up, fix typos
- wrong assignation - reference to 'serials' table rather than 'serial'
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
We need that one for the 16.11 package as well.
I'll confirm that the 16.11 packages still fail as of today when moving an old database (3.22) to 16.11. Upgrade to oldstable (16.05) then to stable (16.11) succeeded without issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We just updated a greater number of installations from 3.22.18 to 16.11.13 without any issues. This appears to be fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- See also bug 19789. We need a coding guideline for these things in general. And make developers aware of it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17292 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #18)
See also bug 19789. We need a coding guideline for these things in general. And make developers aware of it.
Hi Marcel and Jonathan, I have added it as a topic to the next developer meeting: https://wiki.koha-community.org/wiki/Development_IRC_meeting_13_December_201... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org