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 e73c258a99..00e86d535e 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -6695,7 +6695,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)',