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

(-)a/installer/data/mysql/kohastructure.sql (-7 lines)
Lines 2021-2045 DROP TABLE IF EXISTS `statistics`; Link Here
2021
CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha
2021
CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha
2022
  `datetime` datetime default NULL, -- date and time of the transaction
2022
  `datetime` datetime default NULL, -- date and time of the transaction
2023
  `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred
2023
  `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred
2024
  `proccode` varchar(4) default NULL, -- type of procedure used when making payments (does not appear in the code)
2025
  `value` double(16,4) default NULL, -- monetary value associated with the transaction
2024
  `value` double(16,4) default NULL, -- monetary value associated with the transaction
2026
  `type` varchar(16) default NULL, -- transaction type (locause, issue, return, renew, writeoff, payment, Credit*)
2025
  `type` varchar(16) default NULL, -- transaction type (locause, issue, return, renew, writeoff, payment, Credit*)
2027
  `other` mediumtext, -- used by SIP
2028
  `usercode` varchar(10) default NULL, -- unused in Koha
2029
  `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item
2026
  `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item
2030
  `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
2027
  `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
2031
  `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
2028
  `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
2032
  `associatedborrower` int(11) default NULL, -- unused in Koha
2033
  `ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code
2029
  `ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code
2034
  KEY `timeidx` (`datetime`),
2030
  KEY `timeidx` (`datetime`),
2035
  KEY `branch_idx` (`branch`),
2031
  KEY `branch_idx` (`branch`),
2036
  KEY `proccode_idx` (`proccode`),
2037
  KEY `type_idx` (`type`),
2032
  KEY `type_idx` (`type`),
2038
  KEY `usercode_idx` (`usercode`),
2039
  KEY `itemnumber_idx` (`itemnumber`),
2033
  KEY `itemnumber_idx` (`itemnumber`),
2040
  KEY `itemtype_idx` (`itemtype`),
2034
  KEY `itemtype_idx` (`itemtype`),
2041
  KEY `borrowernumber_idx` (`borrowernumber`),
2035
  KEY `borrowernumber_idx` (`borrowernumber`),
2042
  KEY `associatedborrower_idx` (`associatedborrower`),
2043
  KEY `ccode_idx` (`ccode`)
2036
  KEY `ccode_idx` (`ccode`)
2044
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2037
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2045
2038
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +15 lines)
Lines 11721-11726 if ( CheckVersion($DBversion) ) { Link Here
11721
11721
11722
}
11722
}
11723
11723
11724
$DBversion = "3.23.00.XXX";
11725
if(CheckVersion($DBversion)) {
11726
    $dbh->do(q{
11727
        ALTER TABLE statistics
11728
         DROP COLUMN associatedborrower
11729
         DROP COLUMN usercode
11730
         DROP COLUMN other
11731
         DROP COLUMN proccode
11732
    });
11733
11734
11735
    print "Upgrade to $DBversion done (Bug 13795 - Delete unused fields from statistics table)\n";
11736
    SetVersion($DBversion);
11737
}
11738
11724
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
11739
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
11725
# SEE bug 13068
11740
# SEE bug 13068
11726
# if there is anything in the atomicupdate, read and execute it.
11741
# if there is anything in the atomicupdate, read and execute it.
11727
- 

Return to bug 13795