From 9344d266c7f02cdbf82f5c367e34e3575c867f44 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 19 Oct 2007 00:28:03 -0500 Subject: [PATCH] Adding index on userid in the borrowers table Signed-off-by: Joshua Ferraro --- installer/kohastructure.sql | 1 + kohaversion.pl | 2 +- updater/updatedatabase | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/installer/kohastructure.sql b/installer/kohastructure.sql index 1b8615c342..50d53c5f26 100644 --- a/installer/kohastructure.sql +++ b/installer/kohastructure.sql @@ -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; diff --git a/kohaversion.pl b/kohaversion.pl index 2e4ae9858d..891a4ac917 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -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; diff --git a/updater/updatedatabase b/updater/updatedatabase index cc64ed3fe5..42baaa3e1f 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -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 -- 2.39.2