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

(-)a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl (+12 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{ 
4
        ALTER TABLE statistics
5
         DROP COLUMN associatedborrower
6
         DROP COLUMN usercode
7
    });
8
9
    SetVersion($DBversion);
10
11
    print "Upgrade to $DBversion done (Bug 13795 - Delete unused fields from statistics table)\n";
12
}
(-)a/installer/data/mysql/kohastructure.sql (-5 lines)
Lines 1978-1998 CREATE TABLE `statistics` ( -- information related to transactions (circulation Link Here
1978
  `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
1979
  `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)
1980
  `other` LONGTEXT, -- used by SIP
1980
  `other` LONGTEXT, -- used by SIP
1981
  `usercode` varchar(10) default NULL, -- unused in Koha
1982
  `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item
1981
  `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item
1983
  `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
1982
  `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
1984
  `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
1983
  `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
1985
  `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
1984
  `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
1986
  `associatedborrower` int(11) default NULL, -- unused in Koha
1987
  `ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code
1985
  `ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code
1988
  KEY `timeidx` (`datetime`),
1986
  KEY `timeidx` (`datetime`),
1989
  KEY `branch_idx` (`branch`),
1987
  KEY `branch_idx` (`branch`),
1990
  KEY `type_idx` (`type`),
1988
  KEY `type_idx` (`type`),
1991
  KEY `usercode_idx` (`usercode`),
1992
  KEY `itemnumber_idx` (`itemnumber`),
1989
  KEY `itemnumber_idx` (`itemnumber`),
1993
  KEY `itemtype_idx` (`itemtype`),
1990
  KEY `itemtype_idx` (`itemtype`),
1994
  KEY `borrowernumber_idx` (`borrowernumber`),
1991
  KEY `borrowernumber_idx` (`borrowernumber`),
1995
  KEY `associatedborrower_idx` (`associatedborrower`),
1996
  KEY `ccode_idx` (`ccode`)
1992
  KEY `ccode_idx` (`ccode`)
1997
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1993
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1998
1994
1999
- 

Return to bug 13795