From 568c53b4b45b8c41f3590b37c83dc43d9bb549c2 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 26 Jan 2015 07:48:07 -0500 Subject: [PATCH] Bug 9303 [QA Followup 3] --- installer/data/mysql/updatedatabase.pl | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index dbb76c8..9037d55 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9675,20 +9675,23 @@ if(CheckVersion($DBversion)) { $dbh->do(q{ ALTER TABLE borrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy }); + $dbh->do(q{ ALTER TABLE deletedborrowers ADD privacy_guarantor_checkouts BOOLEAN NOT NULL DEFAULT '0' AFTER privacy }); + $dbh->do(q{ - ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL PRIMARY KEY FIRST + ALTER TABLE old_issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST }); + $dbh->do(q{ - ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST + ALTER TABLE old_issues CHANGE issue_id issue_id INT( 11 ) NOT NULL }); + $dbh->do(q{ - ALTER TABLE issues - DROP INDEX itemnumber_idx, - ADD UNIQUE itemnumber_idx ( itemnumber ) + ALTER TABLE issues ADD issue_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST }); + $dbh->do(qq{ UPDATE issues SET issue_id = issue_id + ( SELECT COUNT(*) FROM old_issues ) ORDER BY issue_id DESC }); @@ -9703,7 +9706,7 @@ if(CheckVersion($DBversion)) { }); $dbh->do(q{ - INSERT INTO systempreferences (variable, value, options, explanation, type ) + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ( 'AllowStaffToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo' @@ -9711,7 +9714,7 @@ if(CheckVersion($DBversion)) { }); $dbh->do(q{ - INSERT INTO systempreferences (variable, value, options, explanation, type ) + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES ( 'AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo' -- 1.7.2.5