From 80a5961de5b9a95a4b4aecefa52a5d2961a647e4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 31 Oct 2014 07:15:49 -0400 Subject: [PATCH] Bug 9303 [QA Followup] - Don't drop non-existant keys --- installer/data/mysql/updatedatabase.pl | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index eeb0210..886146f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9701,25 +9701,15 @@ if(CheckVersion($DBversion)) { ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' }); $dbh->do(q{ - ALTER TABLE old_issues DROP PRIMARY KEY - }); - $dbh->do(q{ ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST }); $dbh->do(q{ - ALTER TABLE old_issues DROP INDEX itemnumber_idx - }); - $dbh->do(q{ - ALTER TABLE issues DROP PRIMARY KEY - }); - $dbh->do(q{ ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST }); $dbh->do(q{ - ALTER TABLE issues DROP INDEX itemnumber_idx - }); - $dbh->do(q{ - ALTER TABLE issues ADD UNIQUE itemnumber_idx (itemnumber) + ALTER TABLE issues + DROP INDEX itemnumber_idx, + ADD UNIQUE itemnumber_idx ( itemnumber ) }); $dbh->do(qq{ UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC -- 1.7.2.5