From 0e009107c40065a5989aa0664402decc4ab89470 Mon Sep 17 00:00:00 2001 From: Mason James Date: Thu, 23 Nov 2017 01:42:46 +1300 Subject: [PATCH] Bug 18801: DBRev 16.05.18.001 --- installer/data/mysql/updatedatabase.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b44e6102a9..3a5985e97a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13030,6 +13030,26 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '16.05.18.001'; +if( CheckVersion( $DBversion ) ) { + # Fetch all auth types + my $authtypes = $dbh->selectcol_arrayref( q|SELECT authtypecode FROM auth +_types| ); + + if( grep { $_ eq 'Default' } @$authtypes ) { + # If this exists as an authtypecode, we don't do anything + } else { + # Replace the incorrect Default by empty string + $dbh->do( q|UPDATE auth_header SET authtypecode='' WHERE authtypecode +='Default'| ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18801 - Update incorrect Default a +uth type codes)\n"; +} + + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug sss # if there is anything in the atomicupdate, read and execute it. -- 2.39.5