[Bug 41460] New: On Mysql on upgrade from 25.05 to 25.11 I got the error TEXT column 'value' can't have a default value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Bug ID: 41460 Summary: On Mysql on upgrade from 25.05 to 25.11 I got the error TEXT column 'value' can't have a default value Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.11 Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Database Assignee: koha-bugs@lists.koha-community.org Reporter: michael.hafen@washk12.org QA Contact: testopia@bugs.koha-community.org Mysql does not allow blob or text type columns to have a default. The systempreferences.value column is the only occurrence of this I found in the kohastructure.sql file. It seems Mysql will ignore the default null as long as the column allows null, so that's not an issue. Bug 40405 sets systempreferences.value to NOT NULL, but tries to also add a DEFAULT '', which causes Mysql to throw the above error. Proposed solution is to remove the DEFAULT '' part of the clause from the db_rev file. -- 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=41460 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40405 -- 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=41460 --- Comment #1 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 190558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190558&action=edit Bug 41460: Remove default value from mediumtext column systempreferences.value Bug 41460: Remove default value from mediumtext column systempreferences.value Mysql doesn't allow text type columns to have a default. I think this is a trivial patch. -- 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=41460 Michael Hafen <michael.hafen@washk12.org> 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=41460 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40405 CC| |martin.renvoize@openfifth.c | |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405 [Bug 40405] systempreferences.value cannot be set to NULL -- 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=41460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Any hints on how to test this using KTD? -- 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=41460 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- MySQL 8 ? -- 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=41460 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |jonathan.druart@gmail.com --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Then you need to adjust this one: installer/data/mysql/kohastructure.sql 6680 `value` mediumtext NOT NULL DEFAULT '' COMMENT 'system preference values', -- 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=41460 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190558|0 |1 is obsolete| | Status|Failed QA |Needs Signoff Assignee|koha-bugs@lists.koha-commun |michael.hafen@washk12.org |ity.org | --- Comment #5 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 190960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190960&action=edit Bug 41460: Remove default value from mediumtext column systempreferences.value Mysql doesn't allow text type columns to have a default. -- 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=41460 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au Status|Needs Signoff |Failed QA --- Comment #6 from David Cook <dcook@prosentient.com.au> --- I think you need to add an atomic update for main as well, and that will then allow people to test "main' as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190960|0 |1 is obsolete| | --- Comment #7 from Michael Hafen <michael.hafen@washk12.org> --- Created attachment 191330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191330&action=edit Bug 41460: Remove default value from mediumtext column systempreferences.value Mysql doesn't allow text type columns to have a default. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41682 --- Comment #8 from David Nind <david@davidnind.com> --- Happy to test, but don't know enough about how to test this without a test plan. Have added a related bug that deals with other system preference related issues. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ephetteplace@cca.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from David Nind <david@davidnind.com> --- Changed to Failed QA, as no test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Michael Hafen <michael.hafen@washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from Michael Hafen <michael.hafen@washk12.org> --- Test plan: This assumes KTD is already setup. I'm not familiar with KTD, so these instructions may be incomplete. Run ktd with Koha v 25.05 and Mysql: KOHA_IMAGE=25.05 DB_IMAGE=mysql:8.0 ktd up Update ktd to 25.11 ktd --shell cd /kohadevbox/koha git checkout -b 25.11.x origin/25.11.x koha-upgrade-schema main The upgrade schema command will fail with a MySQL error. Apply the patch inside the container and run the upgrade again git bz apply 41460 koha-upgrade-schema main The upgrade will complete. Find the containers address and log into the web staff interface to try setting a System preference docker ps look for something like kohadev-koha-1 sudo docker container inspect kohadev-koha-1 Look for something like IPAddress (I'll assume 127.0.0.1, change the following instruction as appropriate) open 127.0.0.1:8081/ in your browser of choice. Try setting IntranetNav (as an example) and then clear it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Saiful Amin <saiful@semanticconsulting.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |saiful@semanticconsulting.c | |om --- Comment #11 from Saiful Amin <saiful@semanticconsulting.com> ---
koha-upgrade-schema main
Is the instance name 'main'? In ktd, the default instance name is 'kohadev', so the command should be: koha-upgrade-schema kohadev -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 --- Comment #12 from Michael Hafen <michael.hafen@washk12.org> --- (In reply to Saiful Amin from comment #11)
koha-upgrade-schema main
Is the instance name 'main'? In ktd, the default instance name is 'kohadev', so the command should be: koha-upgrade-schema kohadev
I'm sure you're right, I wrote that not knowing what the instance name would be and guessed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk Sponsorship status|--- |Unsponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196014&action=edit Bug 41460: Remove default value from mediumtext column systempreferences.value Mysql doesn't allow text type columns to have a default. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> 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=41460 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191330|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.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=41460 --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Be careful on backports there are 3 patches : 89aa40cc1ea Bug 41460: Fix ALTER TABLE statement 97d980a7ba3 Bug 41460: DBRev 25.12.00.034 7cebccb76f3 Bug 41460: Remove default value from mediumtext column systempreferences.value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 --- Comment #16 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41460 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #17 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 25.05 as it's only for versions after right? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org