Bugzilla – Attachment 7695 Details for
Bug 7509
Create index for items.itemcallnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7509: Added index on items itemcallnumber
Bug-7509-Added-index-on-items-itemcallnumber.patch (text/plain), 2.36 KB, created by
Ian Walls
on 2012-02-16 16:33:17 UTC
(
hide
)
Description:
Bug 7509: Added index on items itemcallnumber
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2012-02-16 16:33:17 UTC
Size:
2.36 KB
patch
obsolete
>From 926627284e14e33d4b26169d00a05d19b6aebdfb Mon Sep 17 00:00:00 2001 >From: Ian Walls <koha.sekjal@gmail.com> >Date: Wed, 8 Feb 2012 15:23:39 +1300 >Subject: [PATCH] Bug 7509: Added index on items itemcallnumber > >Comment from Liz: >I couldn't get this update to fire - I found a small syntax error in the >updatedatabase.pl for this, which I corrected with this patch. > >Functionally, all of this works as tested (once the typos were fixed), but >this probably requires another sign-off. > >QA notes: rebased on latest master. Also added index name `itemcallnumber` >to maintain consistency with all other indexes on items table. > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >Signed-off-by: Ian Walls <koha.sekjal@gmail.com> >--- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > 2 files changed, 8 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 37113c2..67149c9 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1045,6 +1045,7 @@ CREATE TABLE `items` ( -- holdings/item information > KEY `itembibnoidx` (`biblionumber`), > KEY `homebranch` (`homebranch`), > KEY `holdingbranch` (`holdingbranch`), >+ KEY `itemcallnumber` (`itemcallnumber`), > CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE, > CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0ef0b1f..573c111 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4684,6 +4684,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.07.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("ALTER TABLE items ADD KEY `itemcallnumber` (itemcallnumber)"); >+ print "Upgrade to $DBversion done (Added index on items.itemcallnumber)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.7.0.4
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 7509
:
7498
|
7513
|
7516
|
7603
| 7695