[Bug 36993] New: Upgrade to koha-common (24.05.00-1) fails at Upgrade to 23.12.00.023 [Bug 32132]
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Bug ID: 36993 Summary: Upgrade to koha-common (24.05.00-1) fails at Upgrade to 23.12.00.023 [Bug 32132] Change sponsored?: --- Product: Koha Version: Main 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: matthew.charlesworth@hekima.ac.ke QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com I'm getting this error when upgrading from packages. Setting up koha-common (24.05.00-1) ... Upgrading database schema for library Upgrade to 23.12.00.023 [06:09:07]: Bug 32132 - Set aqbudgets.budget_period_id as NOT NULL ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: 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 dpkg: error processing package koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: koha-common E: Sub-process /usr/bin/dpkg returned an error code (1) I've tried 'sudo apt-get --fix-broken install' but it just repeats the message. Is there a way to fix? The library is stuck in maintenance mode. -- 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=36993 Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|NEW |RESOLVED --- Comment #1 from Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> --- I was able to solve it by going into the Database and running the following commands. -- Disable foreign key checks SET FOREIGN_KEY_CHECKS=0; -- Drop the existing foreign key constraint ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1; -- Modify the column to set it as NOT NULL ALTER TABLE aqbudgets MODIFY COLUMN budget_period_id INT NOT NULL; -- Add the foreign key constraint back ALTER TABLE aqbudgets ADD CONSTRAINT aqbudgetperiods_ibfk_1 FOREIGN KEY (budget_period_id) REFERENCES aqbudgetperiods(budget_period_id); -- Enable foreign key checks SET FOREIGN_KEY_CHECKS=1; And then re-running the upgrade, which gave the following output: Setting up koha-common (24.05.00-1) ... Upgrading database schema for library Upgrade to 23.12.00.023 [03:22:38]: Bug 32132 - Set aqbudgets.budget_period_id as NOT NULL Updated aqbudgets.budget_period_id to NOT accept NULL values Upgrade to 23.12.00.024 [03:22:38]: Bug 35065 - Move ILLModuleCopyrightClearance to additional contents Removed system preference 'ILLModuleCopyrightClearance' Upgrade to 23.12.00.025 [03:22:38]: Bug 33393 - Modify sentence above the order table in English 1-page order PDF Added system preference '1PageOrderPDFText' Upgrade to 23.12.00.026 [03:22:38]: Bug 35616 - Add source column to tickets table Added column 'tickets.source' Upgrade to 23.12.00.027 [03:22:38]: Bug 32602 - Add administrative plugins type Added new permission 'plugins_admin' Upgrade to 23.12.00.028 [03:22:38]: Bug 16122 - Add localuse column to items table and deleted items table Added column 'items.localuse' Added column 'deleteditems.localuse' You may use the new /misc/maintenance/update_localuse_from_statistics.pl script to populate the new field from the existing statistics data Upgrade to 23.12.00.029 [03:22:45]: Bug 35919 - Add record_sources table Added new table 'record_sources' Added new column 'biblio_metadata.record_source_id' Added new foreign key 'biblio_metadata.record_metadata_fk_2' Added new column 'deletedbiblio_metadata.record_source_id' Added new foreign key 'deletedbiblio_metadata.record_metadata_fk_2' Added new permission 'manage_record_sources' Upgrade to 23.12.00.030 [03:22:45]: Bug 35728 - Add option to NOT redirect to result when search returns only one record Added system preference 'RedirectToSoleResult' Upgrade to 23.12.00.031 [03:22:45]: Bug 31791 - Add the ability to lock record modification Added new permission 'editcatalogue.edit_locked_records' Added new permission 'editcatalogue.set_record_sources' Upgrade to 23.12.00.032 [03:22:45]: Bug 33478 - Customise the format of notices when they are printed Added column 'letter.style' Upgrade to 23.12.00.033 [03:22:45]: Bug 31652 - Add geo-search: new value for search_field.type enum Added new value 'geo_point' to search_field.type enum Upgrade to 23.12.00.034 [03:22:45]: Bug 12802 - Change type of system preference EmailFieldPrimary to multiple Updated system preference 'EmailFieldPrimary' to include 'selected addresses' option Added new system preference 'EmailFieldSelection' Upgrade to 23.12.00.035 [03:22:45]: Bug 29393 - Add permission borrowers:send_messages_to_borrowers Added new permission 'send_messages_to_borrowers' Upgrade to 23.12.00.036 [03:22:45]: Bug 35138 - Make the Elasticsearch facets configurable Updated DisplayLibraryFacets and search field configuration Upgrade to 23.12.00.037 [03:22:45]: Bug 35626 - Add statuses to catalog concerns Added column 'tickets.status' Added column 'ticket_updates.status' Added TICKET_STATUS authorised value category Upgrade to 23.12.00.038 [03:22:45]: Bug 32435 - Add ticket resolutions to catalog concerns Added TICKET_RESOLUTION authorised value category Upgrade to 23.12.00.039 [03:22:45]: Bug 36002 - Remove aqorders.purchaseordernumber Upgrade to 23.12.00.040 [03:22:45]: Bug 32610 - Add option for additional patron attributes of type date Added column 'borrower_attribute_types.is_date' Upgrade to 23.12.00.041 [03:22:45]: Bug 15565 - Add DisplayMultiItemHolds system preference Added new system preference 'DisplayMultiItemHolds' Upgrade to 23.12.00.042 [03:22:45]: Bug 35657 - Add assignee_id to tickets Added column 'tickets.assignee_id' Added column 'ticket_updates.assignee_id' Upgrade to 23.12.00.043 [03:22:45]: Bug 25159 - Add action logs should be stored in JSON ( and as a diff of the change ) Added column 'action_logs.diff' Upgrade to 23.12.00.044 [03:22:45]: Bug 36120 - Add pickup location to bookings Added column 'bookings.pickup_library_id' Set existing bookings pickup location to item homebranch Set pickup_library_id to NOT NULL Upgrade to 23.12.00.045 [03:22:45]: Bug 22740 - Preferences to enable automated setting of lost status when the associated fine is paid or written off Added new system preference 'UpdateItemLostStatusWhenPaid' Added new system preference 'UpdateItemLostStatusWhenWriteoff' Upgrade to 23.12.00.046 [03:22:45]: Bug 27753 - Automate resolution of return claim when checking in an item Added new system preference 'AutoClaimReturnStatusOnCheckin' Added new system preference 'AutoClaimReturnStatusOnCheckout' Upgrade to 23.12.00.047 [03:22:45]: Bug 35169 - Add new system preferences for longoverdue.pl borrowers categories Added new system preference 'DefaultLongOverduePatronCategories' Added new system preference 'DefaultLongOverdueSkipPatronCategories' Upgrade to 23.12.00.048 [03:22:45]: Bug 33134 - Add some 76 missing languages Added 76 new languages Upgrade to 23.12.00.049 [03:22:45]: Bug 36396 - Link Elasticsearch facets with authorized value categories Added Elasticsearch facets with authorized value categories Upgrade to 23.12.00.050 [03:22:45]: Bug 36687 - Set itemtypes.notforloan to NOT NULL and tinyint(1) Updated itemtypes.notforlaon column' Upgrade to 23.12.00.051 [03:22:45]: Bug 31097 - Change default 'Manual' restriction test Updated patron restriction types display for MANUAL restrictions from 'Manual' to 'Manual restriction' Upgrade to 23.12.00.052 [03:22:46]: Bug 32256 - Self checkout batch mode Added system preference 'SCOBatchCheckoutsValidCategories' Upgrade to 23.12.00.053 [03:22:46]: Bug 36755 - Increase length of 'code' column in borrower_attribute_types Increased borrower_attribute_types.code column length from 10 to 64 Upgrade to 23.12.00.054 [03:22:46]: Bug 19768 - Add 'Title notes' tab to OpacSerialDefaultTab system preference Added 'Title notes' option to opacSerialDefaultTab system preference Upgrade to 23.12.00.055 [03:22:46]: Bug 30047 - Add thesaurus and heading fields to auth_header table Added column 'auth_header.heading' Upgrade to 23.12.00.056 [03:22:46]: Bug 35149 - Add 'do nothing' option to CircAutoPrintQuickSlip syspref explanation Updated system preference 'CircAutoPrintQuickSlip' Upgrade to 23.12.00.057 [03:22:46]: Bug 29948 - Display author information for researchers Added new system preference 'OPACAuthorIdentifiersAndInformation' Removed system preference 'OPACAuthorIdentifiers' Upgrade to 23.12.00.058 [03:22:46]: Bug 28869 - Add authorised_value_categories.is_integer_only Upgrade to 23.12.00.059 [03:22:46]: Bug 36819 - Change barcode width value if it still has the wrong default value Changed the barcode width in patron card creator default layout from 8% to 80%. Upgrade to 23.12.00.060 [03:22:46]: Bug 36665 - Add system preference StaffLoginBranchBasedOnIP Added new system preference 'StaffLoginBranchBasedOnIP' Upgrade to 23.12.00.061 [03:22:46]: Bug 26176 - Rename AutoLocation and StaffLoginBranchBasedOnIP system preferences Renamed system preference 'AutoLocation' to 'StaffLoginRestrictLibraryByIP' Upgrade to 24.05.00.000 [03:22:46]: Koha 24.05.00 release -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME |--- --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Matthew Charlesworth from comment #1)
I was able to solve it by going into the Database and running the following commands.
-- Disable foreign key checks SET FOREIGN_KEY_CHECKS=0;
-- Drop the existing foreign key constraint ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1;
-- Modify the column to set it as NOT NULL ALTER TABLE aqbudgets MODIFY COLUMN budget_period_id INT NOT NULL;
-- Add the foreign key constraint back ALTER TABLE aqbudgets ADD CONSTRAINT aqbudgetperiods_ibfk_1 FOREIGN KEY (budget_period_id) REFERENCES aqbudgetperiods(budget_period_id);
-- Enable foreign key checks SET FOREIGN_KEY_CHECKS=1;
It's great that you were able to solve it, but I will re-open this bug as it's been reported a few times now and I think we need to make sure that we solve it in Koha properly. -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |32132 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32132 [Bug 32132] Missing budget_period_id in aqbudgets kills lateorders.pl -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Upgrade to koha-common |Upgrade fails at |(24.05.00-1) fails at |23.12.00.023 [Bug 32132] |Upgrade to 23.12.00.023 | |[Bug 32132] | -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority Status|REOPENED |NEW --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Matthew, since this might play a role in it working for some but not others: What is the DBMS you are using and the exact version of it? -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36978 -- 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=36993 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vivek.yadava@pnguot.ac.pg --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 36992 has been marked as a duplicate of this bug. *** -- 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=36993 --- Comment #5 from Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> --- Hi Katrin, (In reply to Katrin Fischer from comment #3)
Matthew, since this might play a role in it working for some but not others: What is the DBMS you are using and the exact version of it?
Here is the Version information from the Server Information tab in the About Koha page. Koha version: 24.05.00.000 OS version ('uname -a'): Linux ip-172-31-36-26 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 Perl version: 5.034000 MySQL version: 5.5.5-10.6.16-MariaDB-0ubuntu0.22.04.1 Apache version: Server version: Apache/2.4.52 (Ubuntu) M. -- 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=36993 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi --- Comment #6 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- I'm unable to reproduce this on my environment, but this might be DBMS version issue as Katrin suggested on bug 32132. I think proper way to fix this is to drop key, make changes to the field and then adding key again as Matthew did to solve this. This has been done also in similar bugs (see bug 31086). Katrin, do I make changes to the existing db_revs file (231200023.pl) or should I make a new one? -- 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=36993 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It's a good question. I think you are correct that we need to fix the database update itself so people don't get stuck on it. Thx for the quick reaction! -- 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=36993 --- Comment #8 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Matthew Charlesworth from comment #5)
Hi Katrin,
(In reply to Katrin Fischer from comment #3)
Matthew, since this might play a role in it working for some but not others: What is the DBMS you are using and the exact version of it?
Here is the Version information from the Server Information tab in the About Koha page.
Koha version: 24.05.00.000 OS version ('uname -a'): Linux ip-172-31-36-26 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 Perl version: 5.034000 MySQL version: 5.5.5-10.6.16-MariaDB-0ubuntu0.22.04.1 Apache version: Server version: Apache/2.4.52 (Ubuntu)
M.
Well that's odd, I have almost exactly same versions of each of these. Except OS is different. -- 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=36993 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Emmi Takkinen from comment #8)
(In reply to Matthew Charlesworth from comment #5)
Hi Katrin,
(In reply to Katrin Fischer from comment #3)
Matthew, since this might play a role in it working for some but not others: What is the DBMS you are using and the exact version of it?
Here is the Version information from the Server Information tab in the About Koha page.
Koha version: 24.05.00.000 OS version ('uname -a'): Linux ip-172-31-36-26 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 Perl version: 5.034000 MySQL version: 5.5.5-10.6.16-MariaDB-0ubuntu0.22.04.1 Apache version: Server version: Apache/2.4.52 (Ubuntu)
M.
Well that's odd, I have almost exactly same versions of each of these. Except OS is different.
Could it be something like the sql strict settings? -- 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=36993 --- Comment #10 from Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> --- Dear Katrin, (In reply to Katrin Fischer from comment #9)
Could it be something like the sql strict settings?
MariaDB [...]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------+ | sql_mode | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------+ 1 row in set (0.004 sec) M. -- 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=36993 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks! Emmi: I think we should still do what you suggest and drop/recreate - that should put us on the save side. ...and maybe as this happened before a coding guideline? -- 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=36993 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.org | Status|NEW |ASSIGNED --- Comment #12 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Katrin Fischer from comment #11)
Thanks!
Emmi: I think we should still do what you suggest and drop/recreate - that should put us on the save side.
...and maybe as this happened before a coding guideline?
I think so too, I'll take a look if there is an example how we have dealt with these kind of situation previously and then provide a patch. By the way, I just checked what my database says when "SHOW VARIABLES LIKE 'sql_mode';" is run and result is same as Matthews :D -- 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=36993 --- Comment #13 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Fixing existing db_rev file seems to be the way to go (bug 34516). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #14 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- I just realized that there might be situations where aqbudgets.budget_period_id has value of non-existing budget_period_id, so this has to be fixed also. Otherwise adding "aqbudgetperiods_ibfk_1" doesn't work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #15 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Matthew: could it be that you have values in aqbudgets.budget_period_id column that don't exist on aqbudgetperiods.budget_period_id? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #16 from Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> --- Hi Emmi, (In reply to Emmi Takkinen from comment #15)
Matthew: could it be that you have values in aqbudgets.budget_period_id column that don't exist on aqbudgetperiods.budget_period_id?
To be honest I'm not sure. If I do this, does this tell you? MariaDB [...]> select budget_period_id from aqbudgets; +------------------+ | budget_period_id | +------------------+ | 1 | +------------------+ 1 row in set (0.001 sec) MariaDB [...]> select budget_period_id from aqbudgetperiods; +------------------+ | budget_period_id | +------------------+ | 1 | +------------------+ 1 row in set (0.000 sec) It looks like they're the same. M. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #17 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Matthew Charlesworth from comment #16)
Hi Emmi,
(In reply to Emmi Takkinen from comment #15)
Matthew: could it be that you have values in aqbudgets.budget_period_id column that don't exist on aqbudgetperiods.budget_period_id?
To be honest I'm not sure. If I do this, does this tell you?
MariaDB [...]> select budget_period_id from aqbudgets; +------------------+ | budget_period_id | +------------------+ | 1 | +------------------+ 1 row in set (0.001 sec)
MariaDB [...]> select budget_period_id from aqbudgetperiods; +------------------+ | budget_period_id | +------------------+ | 1 | +------------------+ 1 row in set (0.000 sec)
It looks like they're the same.
M.
Hmm, they are indeed. This should also return empty: SELECT COUNT(*) FROM aqbudgets WHERE budget_period_id IS NULL OR budget_period_id NOT IN(SELECT budget_period_id FROM aqbudgetperiods); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #18 from Matthew Charlesworth <matthew.charlesworth@hekima.ac.ke> --- Hi, (In reply to Emmi Takkinen from comment #17)
Hmm, they are indeed. This should also return empty:
SELECT COUNT(*) FROM aqbudgets WHERE budget_period_id IS NULL OR budget_period_id NOT IN(SELECT budget_period_id FROM aqbudgetperiods);
Well, 0... MariaDB [...]> SELECT COUNT(*) FROM aqbudgets WHERE budget_period_id IS NULL OR budget_period_id NOT IN(SELECT budget_period_id FROM aqbudgetperiods); +----------+ | COUNT(*) | +----------+ | 0 | +----------+ 1 row in set (0.000 sec) M. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #19 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 167306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167306&action=edit Bug 36993: Upgrade fails at 23.12.00.023 [Bug 32132] Database update fails on some databases because of foreign key constraint error. This comes from attempt to make column aqbudgets.budget_period_id not accept NULL values. Update also fails if there are rows where column aqbudgets.budget_period_id doesn't match any values in aqbudgetperiods.budget_period_id. To test: 1. Remove changes made in bug 32132 and downgrade your database: - ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL; - UPDATE aqbudgets SET budget_period_id = NULL WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods WHERE budget_period_description = "Budget for funds without budget"); - DELETE FROM aqbudgetperiods WHERE budget_period_description = "Budget for funds without budget"; - UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version; 2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl) => Update fails on foreign key constraint error. 4. Apply this patch. 5. Try to update your database again. => Database should now be upgraded succesfully. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #20 from David Nind <david@davidnind.com> --- Created attachment 167315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167315&action=edit Bug 36993 - Output from testing I had a go at testing, but I couldn't the upgrade to fail for aqbudgets - it does fail for a different bug (bug 26176). I've attached a file with the output from the different commands if this is of any help. Testing using KTD (which uses MariaDB I think). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #20)
Created attachment 167315 [details] Bug 36993 - Output from testing
I had a go at testing, but I couldn't the upgrade to fail for aqbudgets - it does fail for a different bug (bug 26176).
I've attached a file with the output from the different commands if this is of any help.
Testing using KTD (which uses MariaDB I think).
I think we still haven't managed to find the very source of the issue (DBMS version, configuration etc.). If the database update still passes and does the requires change, that might also be ok. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 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 watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167306|0 |1 is obsolete| | --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 167377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167377&action=edit Bug 36993: Upgrade fails at 23.12.00.023 [Bug 32132] Database update fails on some databases because of foreign key constraint error. This comes from attempt to make column aqbudgets.budget_period_id not accept NULL values. Update also fails if there are rows where column aqbudgets.budget_period_id doesn't match any values in aqbudgetperiods.budget_period_id. To test: 1. Remove changes made in bug 32132 and downgrade your database: - ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL; - UPDATE aqbudgets SET budget_period_id = NULL WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods WHERE budget_period_description = "Budget for funds without budget"); - DELETE FROM aqbudgetperiods WHERE budget_period_description = "Budget for funds without budget"; - UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version; 2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl) => Update fails on foreign key constraint error. 4. Apply this patch. 5. Try to update your database again. => Database should now be upgraded succesfully. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.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=36993 Martin Renvoize <martin.renvoize@ptfs-europe.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=36993 --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm pretty confident this won't cause any further issues and makes the update more reliable.. I think we should push it and see ;P Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to main for 24.11.00, thanks all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.01 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable --- Comment #25 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.05.x for 24.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #26 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not for 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov --- Comment #27 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- (In reply to Katrin Fischer from comment #21)
I think we still haven't managed to find the very source of the issue (DBMS version, configuration etc.). If the database update still passes and does the requires change, that might also be ok.
It most likely is the sql strict settings - see bug 35687. And +1 for adding a coding guideline! Maybe we can discuss at next week's dev meeting? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=36993 --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Emily Lamancusa from comment #27)
(In reply to Katrin Fischer from comment #21)
I think we still haven't managed to find the very source of the issue (DBMS version, configuration etc.). If the database update still passes and does the requires change, that might also be ok.
It most likely is the sql strict settings - see bug 35687.
And +1 for adding a coding guideline! Maybe we can discuss at next week's dev meeting?
Just followed up on this and it looks like we decided to add one :) https://hedgedoc.ishukone.net/Development_IRC_meeting_12_June_2024# -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36993 Bug 36993 depends on bug 32132, which changed state. Bug 32132 Summary: Missing budget_period_id in aqbudgets kills lateorders.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32132 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |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=36993 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37820 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37820 [Bug 37820] Upgrade fails at 23.12.00.023 [Bug 36993] -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org