As requested in comment12, we can update these cases in a dbrev too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked out item, deleted issue record, ran dbrev.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit
74cc24d227835ee822707dd808382371f1a6bae8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do( q|
+UPDATE items LEFT JOIN issues USING (itemnumber)
+SET items.onloan = NULL
+WHERE issues.itemnumber IS NULL
+ |);
+
+ # Always end with this (adjust the bug info)
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 20487: Clear items.onloan for unissued items)\n";
+}