Bug 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
Product: Koha Reporter: Michael Hafen <michael.hafen>
Component: DatabaseAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low    
Version: 25.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40405
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41460: Remove default value from mediumtext column systempreferences.value

Description Michael Hafen 2025-12-16 18:40:07 UTC
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.
Comment 1 Michael Hafen 2025-12-16 18:43:21 UTC
Created attachment 190558 [details] [review]
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.