Adding index on userid in the borrowers table
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
6f15e48f65
commit
9344d266c7
|
|
@ -478,6 +478,7 @@ CREATE TABLE `borrowers` (
|
|||
KEY `borrowernumber` (`borrowernumber`),
|
||||
KEY `categorycode` (`categorycode`),
|
||||
KEY `branchcode` (`branchcode`),
|
||||
KEY `userid` (`userid`),
|
||||
CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
|
||||
CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# and is automatically called by Auth.pm when needed.
|
||||
|
||||
sub kohaversion {
|
||||
return "3.00.00.009";
|
||||
return "3.00.00.010";
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -283,6 +283,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.00.00.010";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("CREATE INDEX `userid` ON borrowers (`userid`) ");
|
||||
print "Upgrade to $DBversion done (userid index added)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
Drop all foreign keys of the table $table
|
||||
|
|
|
|||
Loading…
Reference in New Issue