From bf4223067b0b24e632ada710692827a5adcf5130 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 --- 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 2d5065ba6c..63fe1863c1 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 = "21.05.02.000"; +$VERSION = "21.05.02.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 d4258601e3..983718f6a9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24363,6 +24363,40 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.02 release" ); } +$DBversion = '21.05.02.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