From 2d54c95e902c9111eb812d1b48dc0bb8df824f75 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 17 Apr 2019 14:34:24 -0300 Subject: [PATCH] Bug 21336: Add borrowers.flgAnonymized in an explicit position Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e4d36516f0..6a30650907 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18037,8 +18037,19 @@ if( CheckVersion( $DBversion ) ) { $DBversion = '18.12.00.049'; if( CheckVersion( $DBversion ) ) { - $dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('borrowers', 'flgAnonymized'); - $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('deletedborrowers', 'flgAnonymized'); + + $dbh->do(q{ + ALTER TABLE borrowers + ADD COLUMN flgAnonymized tinyint DEFAULT 0 + AFTER overdrive_auth_token + }) if !column_exists('borrowers', 'flgAnonymized'); + + $dbh->do(q{ + ALTER TABLE deletedborrowers + ADD COLUMN flgAnonymized tinyint DEFAULT 0 + AFTER overdrive_auth_token + }) if !column_exists('deletedborrowers', 'flgAnonymized'); + SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n"; } -- 2.11.4.GIT