Commit 6969a5c8 authored by Leigh Stoller's avatar Leigh Stoller

Add a couple of indexes.

parent bf69d40c
......@@ -339,7 +339,10 @@ CREATE TABLE `apt_instance_history` (
`params` mediumtext,
`manifest` mediumtext,
PRIMARY KEY (`uuid`),
KEY `profile_id` (`profile_id`)
KEY `profile_id` (`profile_id`),
KEY `creator` (`creator`),
KEY `creator_idx` (`creator_idx`),
KEY `pid_idx` (`pid_idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
......
use strict;
use libdb;
use emdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("apt_instance_history", "creator")) {
DBQueryFatal("alter table apt_instance_history add ".
" KEY `creator` (`creator`)");
}
if (!DBKeyExists("apt_instance_history", "creator_idx")) {
DBQueryFatal("alter table apt_instance_history add ".
" KEY `creator_idx` (`creator_idx`)");
}
if (!DBKeyExists("apt_instance_history", "pid_idx")) {
DBQueryFatal("alter table apt_instance_history add ".
" KEY `pid_idx` (`pid_idx`)");
}
return 0;
}
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment