Bug 26940: DBRev 20.05.11.001
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
cd3102557b
commit
b532cd2cf8
2
Koha.pm
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 = "20.05.11.000";
|
||||
$VERSION = "20.05.11.001";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
my $debar = $dbh->selectall_arrayref(q|
|
||||
SELECT d.borrowernumber, GROUP_CONCAT(comment SEPARATOR '\n') AS comment
|
||||
FROM borrower_debarments d
|
||||
LEFT JOIN borrowers b ON b.borrowernumber=d.borrowernumber
|
||||
WHERE ( b.debarredcomment IS NULL OR b.debarredcomment = "" ) AND ( expiration > CURRENT_DATE() OR expiration IS NULL )
|
||||
GROUP BY d.borrowernumber
|
||||
|, { Slice => {} });
|
||||
|
||||
|
||||
my $update_sth = $dbh->prepare(q|
|
||||
UPDATE borrowers
|
||||
SET debarredcomment=?
|
||||
WHERE borrowernumber=?
|
||||
|);
|
||||
for my $d ( @$debar ) {
|
||||
$update_sth->execute($d->{comment}, $d->{borrowernumber});
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 26940, "Put in sync borrowers.debarredcomment with comments from borrower_debarments");
|
||||
}
|
||||
|
|
@ -22595,6 +22595,29 @@ if ( CheckVersion($DBversion) ) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = '20.05.11.001'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
my $debar = $dbh->selectall_arrayref(q|
|
||||
SELECT d.borrowernumber, GROUP_CONCAT(comment SEPARATOR '\n') AS comment
|
||||
FROM borrower_debarments d
|
||||
LEFT JOIN borrowers b ON b.borrowernumber=d.borrowernumber
|
||||
WHERE ( b.debarredcomment IS NULL OR b.debarredcomment = "" ) AND ( expiration > CURRENT_DATE() OR expiration IS NULL )
|
||||
GROUP BY d.borrowernumber
|
||||
|, { Slice => {} });
|
||||
|
||||
|
||||
my $update_sth = $dbh->prepare(q|
|
||||
UPDATE borrowers
|
||||
SET debarredcomment=?
|
||||
WHERE borrowernumber=?
|
||||
|);
|
||||
for my $d ( @$debar ) {
|
||||
$update_sth->execute($d->{comment}, $d->{borrowernumber});
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 26940, "Put in sync borrowers.debarredcomment with comments from borrower_debarments");
|
||||
}
|
||||
|
||||
# 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…
Reference in New Issue