Bugzilla – Attachment 191330 Details for
Bug 41460
On Mysql on upgrade from 25.05 to 25.11 I got the error TEXT column 'value' can't have a default value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41460: Remove default value from mediumtext column systempreferences.value
0001-Bug-41460-Remove-default-value-from-mediumtext-colum.patch (text/plain), 2.89 KB, created by
Michael Hafen
on 2026-01-12 22:59:49 UTC
(
hide
)
Description:
Bug 41460: Remove default value from mediumtext column systempreferences.value
Filename:
MIME Type:
Creator:
Michael Hafen
Created:
2026-01-12 22:59:49 UTC
Size:
2.89 KB
patch
obsolete
>From 9d1bda4049a2f45a9946cfa6a38c17b94e19c9fe Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Tue, 16 Dec 2025 11:40:30 -0700 >Subject: [PATCH] Bug 41460: Remove default value from mediumtext column > systempreferences.value >Content-Type: text/plain; charset="utf-8" > >Mysql doesn't allow text type columns to have a default. >--- > installer/data/mysql/atomicupdate/bug_41460.pl | 18 ++++++++++++++++++ > installer/data/mysql/db_revs/250600005.pl | 2 +- > installer/data/mysql/kohastructure.sql | 2 +- > 3 files changed, 20 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_41460.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_41460.pl b/installer/data/mysql/atomicupdate/bug_41460.pl >new file mode 100755 >index 0000000000..f2810c72e6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_41460.pl >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "41460", >+ description => "Remove column default from systempreferences.value", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ $dbh->do(q{MODIFY COLUMN `value` mediumtext NOT NULL COMMENT 'system preference values'}); >+ >+ # Print useful stuff here >+ # tables >+ say $out "Removed default from column 'systempreferences.value'"; >+ }, >+}; >diff --git a/installer/data/mysql/db_revs/250600005.pl b/installer/data/mysql/db_revs/250600005.pl >index b0aeb88ff2..3de6d1b7ee 100755 >--- a/installer/data/mysql/db_revs/250600005.pl >+++ b/installer/data/mysql/db_revs/250600005.pl >@@ -23,7 +23,7 @@ return { > $dbh->do( > q{ > ALTER TABLE systempreferences >- MODIFY COLUMN `value` mediumtext NOT NULL DEFAULT '' COMMENT 'system preference values' >+ MODIFY COLUMN `value` mediumtext NOT NULL COMMENT 'system preference values' > } > ); > }, >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e65b2af7ca..be98f8bcf4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -6677,7 +6677,7 @@ DROP TABLE IF EXISTS `systempreferences`; > /*!40101 SET character_set_client = utf8mb4 */; > CREATE TABLE `systempreferences` ( > `variable` varchar(50) NOT NULL DEFAULT '' COMMENT 'system preference name', >- `value` mediumtext NOT NULL DEFAULT '' COMMENT 'system preference values', >+ `value` mediumtext NOT NULL COMMENT 'system preference values', > `options` longtext DEFAULT NULL COMMENT 'options for multiple choice system preferences', > `explanation` mediumtext DEFAULT NULL COMMENT 'descriptive text for the system preference', > `type` varchar(20) DEFAULT NULL COMMENT 'type of question this preference asks (multiple choice, plain text, yes or no, etc)', >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41460
:
190558
|
190960
| 191330