From 7261b1c0ad27a17c5b81e66e9bdb2a60d59bab77 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Sat, 8 Feb 2014 09:52:07 +0100 Subject: [PATCH] Bug 11384: (follow-up) test if table exists in update database Signed-off-by: Fridolin Somers --- installer/data/mysql/updatedatabase.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3d8307e..01a33da 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7827,9 +7827,11 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.14.01.002"; if ( CheckVersion($DBversion) ) { - $dbh->do(q{ - ALTER TABLE collections_tracking CHANGE ctId collections_tracking_id integer(11) NOT NULL auto_increment; - }); + if ( TableExists('collections_tracking') ) { + $dbh->do(q{ + ALTER TABLE collections_tracking CHANGE ctId collections_tracking_id integer(11) NOT NULL auto_increment; + }); + } print "Upgrade to $DBversion done (Bug 11384) - change name of collections_tracker.ctId column)\n"; SetVersion ($DBversion); } -- 1.8.3.2