Browse Source

Bug 28567: DBRev 21.06.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
21.05.x
Jonathan Druart 3 years ago
committed by Kyle M Hall
parent
commit
bf4223067b
  1. 2
      Koha.pm
  2. 34
      installer/data/mysql/atomicupdate/bug_28567.perl
  3. 34
      installer/data/mysql/updatedatabase.pl

2
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;

34
installer/data/mysql/atomicupdate/bug_28567.perl

@ -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");
}

34
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/';

Loading…
Cancel
Save