From e2f5dbecdfa4cff34745853c94763904275c89c7 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 --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_28567.perl | 34 ------------------ installer/data/mysql/updatedatabase.pl | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 35 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_28567.perl diff --git a/Koha.pm b/Koha.pm index aab3d94000..e9da245648 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.06.00.010"; +$VERSION = "21.06.00.011"; 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 fd97a34c50..8f1d037791 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24446,6 +24446,41 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 20472, "Add syspref ArticleRequestsSupportedFormats"); } +$DBversion = '21.06.00.011'; +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