Bug 20487: (QA follow-up) Requested db revision

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>
This commit is contained in:
Marcel de Rooy 2018-05-31 09:02:12 +02:00 committed by Nick Clemens
parent a744a3e202
commit 74cc24d227

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 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";
}