$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";
}
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
`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`),