Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
KEY `categorycode` (`categorycode`),
KEY `branchcode` (`branchcode`),
KEY `userid` (`userid`),
+ KEY `guarantorid` (`guarantorid`),
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;
SetVersion ($DBversion);
}
-
+$DBversion = "3.02.00.025";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE borrowers ADD KEY `guarantorid` (guarantorid);");
+ print "Upgrade to $DBversion done (Add index on guarantorid)\n";
+ SetVersion ($DBversion);
+}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table