From 036b1b27a5187a746081b784b81651341e24b9c5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 31 May 2018 09:02:12 +0200 Subject: [PATCH] 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 Checked out item, deleted issue record, ran dbrev. Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 74cc24d227835ee822707dd808382371f1a6bae8) Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_20487.perl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20487.perl diff --git a/installer/data/mysql/atomicupdate/bug_20487.perl b/installer/data/mysql/atomicupdate/bug_20487.perl new file mode 100644 index 0000000000..553fd6bc22 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20487.perl @@ -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"; +} -- 2.39.2