From 52e3d51c8b206130522b92cbba2be1aad9196d9d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 5 Jun 2019 12:54:30 +0100 Subject: [PATCH] Bug 10215: (follow-up) Correct existing data This patch adds the correction of data ('' => NULL) during the DB update. Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit 9713e13893c9f2d2b12cea29b23b72a25170462e) Signed-off-by: Fridolin Somers (cherry picked from commit 648587b19c7e8ca4a91b9930c7d6c78fbeb2da0f) Signed-off-by: Lucas Gass --- installer/data/mysql/atomicupdate/bug_10215.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_10215.perl b/installer/data/mysql/atomicupdate/bug_10215.perl index a960435a24..1358cdfb67 100644 --- a/installer/data/mysql/atomicupdate/bug_10215.perl +++ b/installer/data/mysql/atomicupdate/bug_10215.perl @@ -4,6 +4,9 @@ if ( CheckVersion($DBversion) ) { $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE opacnote opacnote LONGTEXT NULL}); $dbh->do(q{ALTER TABLE subscriptionhistory CHANGE librariannote librariannote LONGTEXT NULL}); + $dbh->do(q{UPDATE subscriptionhistory SET opacnote = NULL WHERE opacnote = ''}); + $dbh->do(q{UPDATE subscriptionhistory SET librariannote = NULL WHERE librariannote = ''}); + SetVersion ($DBversion); print "Upgrade to $DBversion done (Bug 10215 - Increase the size of opacnote and librariannote for table subscriptionhistory)\n"; } -- 2.39.2