@@ -, +, @@ --- installer/data/mysql/kohastructure.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ 2 files changed, 10 insertions(+), 0 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1054,6 +1054,8 @@ CREATE TABLE `items` ( -- holdings/item information KEY `homebranch` (`homebranch`), KEY `holdingbranch` (`holdingbranch`), KEY `itemcallnumber` (`itemcallnumber`), + KEY `items_location` (`location`), + KEY `items_ccode` (`ccode`), 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 --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5159,6 +5159,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.07.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("CREATE INDEX items_location ON items(location)"); + $dbh->do("CREATE INDEX items_ccode ON items(ccode)"); + print "Upgrade to $DBversion done (items_location and items_ccode indexes added for ShelfBrowser)"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) --