Bug 10459 - DBRev 16.06.00.002
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 17:15:21 +0000 (17:15 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 17:15:21 +0000 (17:15 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Koha.pm
installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 39d2523..52b62d7 100644 (file)
--- a/Koha.pm
+++ b/Koha.pm
@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
 # - #4 : the developer version. The 4th number is the database subversion.
 #        used by developers when the database changes. updatedatabase take care of the changes itself
 #        and is automatically called by Auth.pm when needed.
-$VERSION = "16.06.00.001";
+$VERSION = "16.06.00.002";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql b/installer/data/mysql/atomicupdate/Bug10459_AddTimestampToBorrowers.sql
deleted file mode 100644 (file)
index 6f428c3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-ALTER TABLE borrowers
-    ADD COLUMN updated_on timestamp NULL DEFAULT CURRENT_TIMESTAMP
-    ON UPDATE CURRENT_TIMESTAMP
-    AFTER privacy_guarantor_checkouts;
-ALTER TABLE deletedborrowers
-    ADD COLUMN updated_on timestamp NULL DEFAULT CURRENT_TIMESTAMP
-    ON UPDATE CURRENT_TIMESTAMP
-    AFTER privacy_guarantor_checkouts;
index e78fff3..eb9d1f7 100755 (executable)
@@ -12604,17 +12604,37 @@ if ( CheckVersion($DBversion) ) {
 
 $DBversion = "16.06.00.000";
 if ( CheckVersion($DBversion) ) {
-        print "Upgrade to $DBversion done (Koha 16.06 - starting a new dev line at KohaCon16 in Thessaloniki, Greece! Koha is great!)\n";
-            SetVersion($DBversion);
+    print "Upgrade to $DBversion done (Koha 16.06 - starting a new dev line at KohaCon16 in Thessaloniki, Greece! Koha is great!)\n";
+    SetVersion($DBversion);
 }
 
 $DBversion = "16.06.00.001";
 if ( CheckVersion($DBversion) ) {
-        $dbh->do(q{
-                UPDATE accountlines SET accounttype='HE', description=itemnumber WHERE (description REGEXP '^Hold waiting too long [0-9]+') AND accounttype='F';
+    $dbh->do(q{
+        UPDATE accountlines SET accounttype='HE', description=itemnumber WHERE (description REGEXP '^Hold waiting too long [0-9]+') AND accounttype='F';
     });
-            print "Upgrade to $DBversion done (Bug 16200 - 'Hold waiting too long' fee has a translation problem)\n";
-                SetVersion($DBversion);
+
+    print "Upgrade to $DBversion done (Bug 16200 - 'Hold waiting too long' fee has a translation problem)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "16.06.00.002";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        ALTER TABLE borrowers
+            ADD COLUMN updated_on timestamp NULL DEFAULT CURRENT_TIMESTAMP
+            ON UPDATE CURRENT_TIMESTAMP
+            AFTER privacy_guarantor_checkouts;
+    });
+    $dbh->do(q{
+        ALTER TABLE deletedborrowers
+            ADD COLUMN updated_on timestamp NULL DEFAULT CURRENT_TIMESTAMP
+            ON UPDATE CURRENT_TIMESTAMP
+            AFTER privacy_guarantor_checkouts;
+    });
+
+    print "Upgrade to $DBversion done (Bug 10459 - borrowers should have a timestamp)\n";
+    SetVersion($DBversion);
 }