Commit 24fed54c authored by Leigh B Stoller's avatar Leigh B Stoller

Add an index to geni_certificates, on the urn.

parent 8665ea40
......@@ -178,7 +178,8 @@ CREATE TABLE `geni_certificates` (
`privkey` text,
`uri` text,
`urn` text,
PRIMARY KEY (`uuid`)
PRIMARY KEY (`uuid`),
UNIQUE KEY `urn` (`urn`(255))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `geni_crls`;
......
#
# Add a flag to indicate slice is hosed and needs human attention.
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
if (! DBKeyExists("geni_certificates", "urn")) {
DBQueryFatal("alter table geni_certificates add ".
" index `urn` (`urn`(255))");
}
return 0;
}
1;
# 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