From e5d6e0f715a41fec8e3c9a49e5c73e1d69ef18f4 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 Content-Type: text/plain; charset=utf-8 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. --- 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 0000000..553fd6b --- /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.1.4