[Bug 36978] New: Issue upgrading to v24 from v22 - publishercode
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Bug ID: 36978 Summary: Issue upgrading to v24 from v22 - publishercode Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: rex@nicic.gov QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Hi, I'm trying to upgrade from 22.05 to 24 (current). I'm running into this error and I'm not sure how to fix it. I've tried removing the publishercode column from biblioitems and deletedbiblioitems, but it still returns this error. I've also looked at the Installer.pm file, but the error is returning in the middle of a function and I have no idea what to do with that. Any suggestions for how to help get this working again? Upgrading database schema for INSTANCE Upgrade to 23.06.00.007 [21:04:39]: Bug 34029 - Extend datatypes in biblioitems and deletedbiblioitems tables to avoid import errors Updated biblioitems.place to text Updated deletedbiblioitems.place to text ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Can't DROP 'publishercode'; check that column/key exists at /usr/share/koha/lib/C4/Installer.pm line 741 -- 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=36978 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Rex, removing is not the correct fix, the column needs to be there. When you look at the update script used, the drop is not for the column, but for the index: https://git.koha-community.org/Koha-community/Koha/src/branch/main/installer... $dbh->do( q{ ALTER TABLE `biblioitems` DROP INDEX `publishercode` } ); say $out "Remove index on biblioitems.publishercode"; $dbh->do( q{ ALTER TABLE `biblioitems` MODIFY COLUMN `publishercode` text DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)' } ); Can you verify there is no index publishercode in your installation? Adding it might make that one pass... but we need to get some more information. 24.05 (we do 2 releases a year) is as old as yesterday, so it's very very new. -- 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=36978 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Issue upgrading to v24 from |Issue upgrading to 24.05 |v22 - publishercode |from 22.05 - publishercode Depends on| |34029 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34029 [Bug 34029] Import breaks when data exceeds size of mapped database columns -- 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=36978 --- Comment #2 from Rex Barkdoll <rex@nicic.gov> --- Ok, I've restored my database to a previous version. As far as I can tell, there's no index. How would I go about adding one correctly? -- 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=36978 --- Comment #3 from Rex Barkdoll <rex@nicic.gov> --- Ok, after a little research into the Koha codebase, i saw how it was done originally, adding the index to the biblioitems and deletedbiblioitems tables allowed the upgrade to progress and then i hit a new wall. "cannot change column 'budget_period_id': used in a foreign key constraint 'aqbudgetperiods_ibfk_1' at /usr/share/koha/lib/C4/Installer.pm line 741 -- 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=36978 --- Comment #4 from Rex Barkdoll <rex@nicic.gov> --- Ok, I've finally upgraded to 24.05.00.000 I took a screenshot of the Foreign Key constraint in PHPmyadmin's relation view and figured out how to remove it so that i could run the upgrade again. The upgrade continued until got stopped here: Upgrade to 23.12.00.044 [17:47:36]: Bug 36120 - Add pickup location to bookings Added column 'bookings.pickup_library_id' Set existing bookings pickup location to item homebranch ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'pickup_library_id': used in a foreign key constraint 'bookings_ibfk_4' at /usr/share/koha/lib/C4/Installer.pm line 741 I added back the first constraint to the aqbudgets.budget_period_id then repeated the process of screenshotting the bookings.pickup_library_id foreign key, removing it, running the update (which then got me all the way to version 24.05) and then finally re-added the constraint for bookings.pickup_library_id. Koha is back up and running now, so I should be all good. I would appreciate it if you could let me know whether adding back those foreign key constraints was the right thing to do or if I should remove them? Thank you for your assistance on this Katrin :) -- 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=36978 Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthew.charlesworth@hekima | |.ac.ke -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|22.05 |24.05 Summary|Issue upgrading to 24.05 |Upgrade fails at |from 22.05 - publishercode |23.06.00.007 [Bug 34029] See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36993, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37000 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We'll split this into different bugs for the issues found. This way it's easier as we can link it to the bug that caused the issue in the first place: This bug ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Can't DROP 'publishercode'; check that column/key exists at Bug 36993: "cannot change column 'budget_period_id': used in a foreign key constraint 'aqbudgetperiods_ibfk_1' at /usr/share/koha/lib/C4/Installer.pm line 741 Bug 37000 ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'pickup_library_id': used in a foreign key constraint 'bookings_ibfk_4' at /usr/share/koha/lib/C4/Installer.pm line 741 -- 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=36978 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|normal |blocker -- 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=36978 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 167379 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167379&action=edit Bug 36978: [Bug 34029 follow-up] Make update idempotent The update wasn't checking for index pre-existance and as such could fail in certain cases. -- 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=36978 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com Status|NEW |Needs 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=36978 Chris Cormack <chris@bigballofwax.co.nz> 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=36978 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167379|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 167562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167562&action=edit Bug 36978: [Bug 34029 follow-up] Make update idempotent The update wasn't checking for index pre-existance and as such could fail in certain cases. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |julian.maurice@biblibre.com |y.org | CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167562|0 |1 is obsolete| | --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 167570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167570&action=edit Bug 36978: (Bug 34029 follow-up) Make update idempotent The update wasn't checking for index pre-existance and as such could fail in certain cases. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Julian Maurice <julian.maurice@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=36978 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #10 from Magnus Enger <magnus@libriotech.no> --- Just ran into this on an upgrade to 23.11.10-1. Can this be backported, please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |rel_23_11_candidate, | |rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Bug 36978 depends on bug 34029, which changed state. Bug 34029 Summary: Import breaks when data exceeds size of mapped database columns https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34029 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #12 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36978 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |david@davidnind.com Resolution|--- |FIXED --- Comment #13 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org