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

(-)a/installer/data/mysql/atomicupdate/add_index_items.itemcallnumber.pl (+10 lines)
Line 0 Link Here
1
#! /usr/bin/perl
2
use strict;
3
use warnings;
4
use C4::Context;
5
my $dbh = C4::Context->dbh;
6
7
$dbh->do("ALTER TABLE items ADD KEY (itemcallnumber)");
8
9
print "Upgrade done (Added index on items.itemcallnumber)\n";
10
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 1045-1050 CREATE TABLE `items` ( -- holdings/item information Link Here
1045
  KEY `itembibnoidx` (`biblionumber`),
1045
  KEY `itembibnoidx` (`biblionumber`),
1046
  KEY `homebranch` (`homebranch`),
1046
  KEY `homebranch` (`homebranch`),
1047
  KEY `holdingbranch` (`holdingbranch`),
1047
  KEY `holdingbranch` (`holdingbranch`),
1048
  KEY (itemcallnumber),
1048
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1049
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1049
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
1050
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
1050
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
1051
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +8 lines)
Lines 4663-4668 ENDOFRENEWAL Link Here
4663
    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
4663
    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
4664
    SetVersion($DBversion);
4664
    SetVersion($DBversion);
4665
}
4665
}
4666
4667
$DBversion = "3.07.00.XXX";
4668
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4669
    $dbh->do("ALTER TABLE items ADD KEY (itemcallnumber)"
4670
    print "Upgrade to $DBversion done (Added index on items.itemcallnumber)\n";
4671
    SetVersion($DBversion);
4672
}
4673
4666
=head1 FUNCTIONS
4674
=head1 FUNCTIONS
4667
4675
4668
=head2 DropAllForeignKeys($table)
4676
=head2 DropAllForeignKeys($table)
4669
- 

Return to bug 7509