From cb06839461bdc2ddb2e125bc10fe0dbdf00e03da Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 20 Apr 2016 15:22:36 -0400 Subject: [PATCH] Bug 10459: Follow up to update to atomic update methodology --- .../mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql | 8 ++++++++ installer/data/mysql/updatedatabase.pl | 13 ------------- 2 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql diff --git a/installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql b/installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql new file mode 100644 index 0000000..dc3bbb2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql @@ -0,0 +1,8 @@ +ALTER TABLE borrowers + ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP + ON UPDATE CURRENT_TIMESTAMP + AFTER privacy_guarantor_checkouts; +ALTER TABLE deletedborrowers + ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP + ON UPDATE CURRENT_TIMESTAMP + AFTER privacy_guarantor_checkouts; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4ed2d11..fb09c5e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12220,19 +12220,6 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } -$DBversion = "3.23.00.XXX"; -if ( CheckVersion($DBversion) ) { - $dbh->do(q| -ALTER TABLE borrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy; - |); - $dbh->do(q| -ALTER TABLE deletedborrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy; - |); - print "Upgrade to $DBversion done (Bug 10459: Borrowers should have a timestamp)\n"; - SetVersion($DBversion); -} - - # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.1.4