From 1f6fed3edbb88666748bc4ce78c1f0c94f864383 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 23 Jan 2018 15:21:27 +0100 Subject: [PATCH] Bug 20074: Database revision to convert hidden to -5 Content-Type: text/plain; charset=utf-8 The hidden value is used as a boolean in authority frameworks (in contrast with biblio framework). It is consistent to apply the same value (-5) to all non-zero values. Test plan: Check if you a have 0, 1 and 8 value in hidden somewhere. Run the dbrev. Verify that 1 and 8 are converted to -5. Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug20074.perl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug20074.perl diff --git a/installer/data/mysql/atomicupdate/bug20074.perl b/installer/data/mysql/atomicupdate/bug20074.perl new file mode 100644 index 0000000..4d2034b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug20074.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q|UPDATE auth_subfield_structure SET hidden=-5 WHERE hidden<>0|); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20074: Auth_subfield_structure changes hidden attribute)\n"; +} -- 2.1.4