Commit 93958f63 authored by Leigh Stoller's avatar Leigh Stoller

Forgot to commit this yesterday ... beef up the geni_resources table

for use with cooked mode.
parent a39053d8
......@@ -183,11 +183,20 @@ CREATE TABLE `geni_userkeys` (
DROP TABLE IF EXISTS `geni_resources`;
CREATE TABLE `geni_resources` (
`resource_uuid` varchar(40) NOT NULL default '',
`resource_type` varchar(40) NOT NULL default '',
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`idx` mediumint(8) unsigned NOT NULL default '0',
`manager_urn` tinytext,
`created` datetime default NULL,
`component_uuid` varchar(40) NOT NULL default '',
PRIMARY KEY (`resource_uuid`)
`updated` datetime default NULL,
`slice_idx` mediumint(8) unsigned NOT NULL default '0',
`credential_idx` mediumint(8) unsigned NOT NULL default '0',
`manifest_idx` mediumint(8) unsigned NOT NULL default '0',
`ticket_idx` mediumint(8) unsigned NOT NULL default '0',
`newticket_idx` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`idx`),
UNIQUE KEY `manager` (`exptidx`,`manager_urn`(255))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `geni_bindings`;
......
#
# Beef up the geni_resources table for use in cooked mode.
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
if (!DBSlotExists("geni_resources", "manager_urn")) {
DBQueryFatal("DROP TABLE `geni_resources`");
DBQueryFatal("CREATE TABLE `geni_resources` ( ".
" `pid` varchar(12) NOT NULL default '', ".
" `eid` varchar(32) NOT NULL default '', ".
" `exptidx` int(11) NOT NULL default '0', ".
" `idx` mediumint(8) unsigned NOT NULL default '0', ".
" `manager_urn` tinytext, ".
" `created` datetime default NULL, ".
" `updated` datetime default NULL, ".
" `slice_idx` mediumint(8) unsigned NOT NULL default '0', ".
" `credential_idx` mediumint(8) ".
"unsigned NOT NULL default '0',".
" `manifest_idx` mediumint(8) unsigned NOT NULL default '0', ".
" `ticket_idx` mediumint(8) unsigned NOT NULL default '0', ".
" `newticket_idx` mediumint(8) unsigned NOT NULL default '0',".
" PRIMARY KEY (`idx`), ".
" UNIQUE KEY `manager` (`exptidx`,`manager_urn`(255)) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
1;
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