Browse Source

Bug 28567: DBRev 21.06.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 6 months ago
parent
commit
e2f5dbecdf
  1. 2
      Koha.pm
  2. 34
      installer/data/mysql/atomicupdate/bug_28567.perl
  3. 35
      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.06.00.010";
$VERSION = "21.06.00.011";
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");
}

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

Loading…
Cancel
Save