Bug 21683: (QA follow-up) Drop statistics.proccode
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 7 Mar 2019 08:12:30 +0000 (08:12 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 21 Mar 2019 18:19:22 +0000 (18:19 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

installer/data/mysql/atomicupdate/bug_21683_remove_column_accountno.perl
installer/data/mysql/kohastructure.sql

index 0207380..4d044c8 100644 (file)
@@ -5,7 +5,11 @@ if( CheckVersion( $DBversion ) ) {
         $dbh->do( "ALTER TABLE accountlines DROP COLUMN accountno" );
     }
 
+    if( column_exists( 'statistics', 'proccode' ) ) {
+        $dbh->do( "ALTER TABLE statistics DROP COLUMN proccode" );
+    }
+
     # Always end with this (adjust the bug info)
     SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
+    print "Upgrade to $DBversion done (Bug 21683 - Remove accountlines.accountno and statistics.proccode fields)\n";
 }
index f641f32..3b37e8c 100644 (file)
@@ -1975,7 +1975,6 @@ DROP TABLE IF EXISTS `statistics`;
 CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha
   `datetime` datetime default NULL, -- date and time of the transaction
   `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred
-  `proccode` varchar(4) default NULL, -- type of procedure used when making payments (does not appear in the code)
   `value` double(16,4) default NULL, -- monetary value associated with the transaction
   `type` varchar(16) default NULL, -- transaction type (localuse, issue, return, renew, writeoff, payment)
   `other` LONGTEXT, -- used by SIP
@@ -1988,7 +1987,6 @@ CREATE TABLE `statistics` ( -- information related to transactions (circulation
   `ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code
   KEY `timeidx` (`datetime`),
   KEY `branch_idx` (`branch`),
-  KEY `proccode_idx` (`proccode`),
   KEY `type_idx` (`type`),
   KEY `usercode_idx` (`usercode`),
   KEY `itemnumber_idx` (`itemnumber`),