From 8e417216ca4f62b61ab0a748169f80718d54466c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 30 Jul 2021 14:07:09 +0000 Subject: [PATCH] Bug 28567: DBRev 21.06.00.011 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit bf4223067b0b24e632ada710692827a5adcf5130) Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_28567.perl | 34 ------------------- installer/data/mysql/updatedatabase.pl | 34 +++++++++++++++++++ 3 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_28567.perl diff --git a/Koha.pm b/Koha.pm index 788764c348..7c839116cf 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "20.11.08.000"; +$VERSION = "20.11.08.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_28567.perl b/installer/data/mysql/atomicupdate/bug_28567.perl deleted file mode 100644 index 462b10c591..0000000000 --- a/installer/data/mysql/atomicupdate/bug_28567.perl +++ /dev/null @@ -1,34 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - my @fields = qw( - branchname - branchaddress1 - branchaddress2 - branchaddress3 - branchzip - branchcity - branchstate - branchcountry - branchphone - branchfax - branchemail - branchillemail - branchreplyto - branchreturnpath - branchurl - branchip - branchnotes - opac_info - marcorgcode - ); - for my $f ( @fields ) { - $dbh->do(qq{ - UPDATE branches - SET $f = NULL - WHERE $f = "" - }); - } - - NewVersion( $DBversion, 28567, "Set to NULL empty branches fields"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 872567e9ad..89a3a60bd7 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23609,6 +23609,40 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 20.11.08 release" ); } +$DBversion = '20.11.08.001'; +if( CheckVersion( $DBversion ) ) { + my @fields = qw( + branchname + branchaddress1 + branchaddress2 + branchaddress3 + branchzip + branchcity + branchstate + branchcountry + branchphone + branchfax + branchemail + branchillemail + branchreplyto + branchreturnpath + branchurl + branchip + branchnotes + opac_info + marcorgcode + ); + for my $f ( @fields ) { + $dbh->do(qq{ + UPDATE branches + SET $f = NULL + WHERE $f = "" + }); + } + + NewVersion( $DBversion, 28567, "Set to NULL empty branches fields"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5