Bugzilla – Attachment 88233 Details for
Bug 13795
Delete unused columns from statistics table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13795: Delete unused columns from statistics table
Bug-13795-Delete-unused-columns-from-statistics-ta.patch (text/plain), 3.08 KB, created by
Michal Denar
on 2019-04-17 19:16:38 UTC
(
hide
)
Description:
Bug 13795: Delete unused columns from statistics table
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2019-04-17 19:16:38 UTC
Size:
3.08 KB
patch
obsolete
>From 1f99359c5913cc11a424cb530a6df7c5e73d87cb Mon Sep 17 00:00:00 2001 >From: Nicole <nicole@bywatersolutions.com> >Date: Tue, 2 Feb 2016 09:33:46 -0500 >Subject: [PATCH] Bug 13795: Delete unused columns from statistics table > >The following 2 fields are never used in the statistics table: > >associatedborrower >usercode > >This patch removes them. > >To test: > >* check the database and make sure columns are gone > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > .../mysql/atomicupdate/Bug13795_Remove_unused_columns.perl | 12 ++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ---- > 2 files changed, 12 insertions(+), 4 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl > >diff --git a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl b/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl >new file mode 100644 >index 0000000000..51e223eab7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl >@@ -0,0 +1,12 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ ALTER TABLE statistics >+ DROP COLUMN associatedborrower >+ DROP COLUMN usercode >+ }); >+ >+ SetVersion($DBversion); >+ >+ print "Upgrade to $DBversion done (Bug 13795 - Delete unused fields from statistics table)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8c60c99d08..be047fff76 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1983,21 +1983,17 @@ CREATE TABLE `statistics` ( -- information related to transactions (circulation > `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 >- `usercode` varchar(10) default NULL, -- unused in Koha > `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item > `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type > `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c) > `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower >- `associatedborrower` int(11) default NULL, -- unused in Koha > `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 `type_idx` (`type`), >- KEY `usercode_idx` (`usercode`), > KEY `itemnumber_idx` (`itemnumber`), > KEY `itemtype_idx` (`itemtype`), > KEY `borrowernumber_idx` (`borrowernumber`), >- KEY `associatedborrower_idx` (`associatedborrower`), > KEY `ccode_idx` (`ccode`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13795
:
36578
|
47555
|
86809
|
86810
|
86811
|
88233
|
88234
|
88235
|
88238
|
88239
|
88240