View | Details | Raw Unified | Return to bug 21683
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_21683_remove_column_accountno.perl (-1 / +5 lines)
Lines 5-11 if( CheckVersion( $DBversion ) ) { Link Here
5
        $dbh->do( "ALTER TABLE accountlines DROP COLUMN accountno" );
5
        $dbh->do( "ALTER TABLE accountlines DROP COLUMN accountno" );
6
    }
6
    }
7
7
8
    if( column_exists( 'statistics', 'proccode' ) ) {
9
        $dbh->do( "ALTER TABLE statistics DROP COLUMN proccode" );
10
    }
11
8
    # Always end with this (adjust the bug info)
12
    # Always end with this (adjust the bug info)
9
    SetVersion( $DBversion );
13
    SetVersion( $DBversion );
10
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
14
    print "Upgrade to $DBversion done (Bug 21683 - Remove accountlines.accountno and statistics.proccode fields)\n";
11
}
15
}
(-)a/installer/data/mysql/kohastructure.sql (-3 lines)
Lines 1975-1981 DROP TABLE IF EXISTS `statistics`; Link Here
1975
CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha
1975
CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha
1976
  `datetime` datetime default NULL, -- date and time of the transaction
1976
  `datetime` datetime default NULL, -- date and time of the transaction
1977
  `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred
1977
  `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred
1978
  `proccode` varchar(4) default NULL, -- type of procedure used when making payments (does not appear in the code)
1979
  `value` double(16,4) default NULL, -- monetary value associated with the transaction
1978
  `value` double(16,4) default NULL, -- monetary value associated with the transaction
1980
  `type` varchar(16) default NULL, -- transaction type (localuse, issue, return, renew, writeoff, payment)
1979
  `type` varchar(16) default NULL, -- transaction type (localuse, issue, return, renew, writeoff, payment)
1981
  `other` LONGTEXT, -- used by SIP
1980
  `other` LONGTEXT, -- used by SIP
Lines 1988-1994 CREATE TABLE `statistics` ( -- information related to transactions (circulation Link Here
1988
  `ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code
1987
  `ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code
1989
  KEY `timeidx` (`datetime`),
1988
  KEY `timeidx` (`datetime`),
1990
  KEY `branch_idx` (`branch`),
1989
  KEY `branch_idx` (`branch`),
1991
  KEY `proccode_idx` (`proccode`),
1992
  KEY `type_idx` (`type`),
1990
  KEY `type_idx` (`type`),
1993
  KEY `usercode_idx` (`usercode`),
1991
  KEY `usercode_idx` (`usercode`),
1994
  KEY `itemnumber_idx` (`itemnumber`),
1992
  KEY `itemnumber_idx` (`itemnumber`),
1995
- 

Return to bug 21683