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> (cherry picked from commitbb2758839e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit79ef9d3be8) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
e22376c7e9
commit
bf4ec40c6f
|
|
@ -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");
|
||||
}
|
||||
Loading…
Reference in New Issue