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>
This commit is contained in:
parent
1544020e57
commit
7cebccb76f
|
|
@ -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'";
|
||||
},
|
||||
};
|
||||
|
|
@ -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'
|
||||
}
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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)',
|
||||
|
|
|
|||
Loading…
Reference in New Issue