From f0021ca13d884152863465788c54cdc3be7851e1 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 Signed-off-by: Bernardo Gonzalez Kriegel New column created, no errors. Signed-off-by: Mark Tompsett Signed-off-by: Joy Nelson --- .../atomicupdate/Bug10459_AddTimestampToBorrowers.sql | 8 ++++++++ installer/data/mysql/updatedatabase.pl | 12 ------------ 2 files changed, 8 insertions(+), 12 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 e821c57..99e7e95 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12599,18 +12599,6 @@ if ( CheckVersion($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 -- 1.7.10.4