Bug 27808: DB changes - adjust items.onloan when needed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-03-01 13:34:56 +01:00
parent 26b57ad5d2
commit bb2758839e
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q|
UPDATE items
LEFT JOIN issues ON issues.itemnumber=items.itemnumber
SET items.onloan=CAST(issues.date_due AS DATE)
WHERE items.onloan IS NULL
|);
NewVersion( $DBversion, 27808, "Adjust items.onloan if needed");
}