@@ -, +, @@ default to NULL --- installer/data/mysql/atomicupdate/bug_32357.pl | 14 ++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_32357.pl --- a/installer/data/mysql/atomicupdate/bug_32357.pl +++ a/installer/data/mysql/atomicupdate/bug_32357.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "32357", + description => "Set borrower_message_preferences.days_in_advance default to NULL", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + ALTER TABLE borrower_message_preferences ALTER days_in_advance SET DEFAULT NULL; + }); + say $out "Updated column 'borrower_message_preferences.days_in_advance default' to NULL"; + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1253,7 +1253,7 @@ CREATE TABLE `borrower_message_preferences` ( `borrowernumber` int(11) DEFAULT NULL, `categorycode` varchar(10) DEFAULT NULL, `message_attribute_id` int(11) DEFAULT 0, - `days_in_advance` int(11) DEFAULT 0, + `days_in_advance` int(11) DEFAULT NULL, `wants_digest` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`borrower_message_preference_id`), KEY `borrowernumber` (`borrowernumber`), --