@@ -, +, @@ --- Koha/Patron/Modification.pm | 2 -- installer/data/mysql/atomicupdate/bug_25086.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_25086.perl --- a/Koha/Patron/Modification.pm +++ a/Koha/Patron/Modification.pm @@ -70,8 +70,6 @@ sub store { }; } - $self->changed_fields('') unless defined $self->changed_fields; - return $self->SUPER::store(); } --- a/installer/data/mysql/atomicupdate/bug_25086.perl +++ a/installer/data/mysql/atomicupdate/bug_25086.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + + $dbh->do( "ALTER TABLE borrower_modifications MODIFY changed_fields MEDIUMTEXT DEFAULT NULL" ); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 25086, "Set changed_fields column of borrower_modifications as nullable"); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -3387,7 +3387,7 @@ CREATE TABLE borrower_attribute_types_branches( -- association table between bor CREATE TABLE IF NOT EXISTS `borrower_modifications` ( `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `verification_token` varchar(255) NOT NULL DEFAULT '', - `changed_fields` MEDIUMTEXT NOT NULL, + `changed_fields` MEDIUMTEXT DEFAULT NULL, `borrowernumber` int(11) NOT NULL DEFAULT '0', `cardnumber` varchar(32) DEFAULT NULL, `surname` LONGTEXT, --