Commit 27d6f3c7 authored by Leigh B Stoller's avatar Leigh B Stoller

Add rspecs table for saving rspecs in cooked mode.

parent 6250fa50
......@@ -206,10 +206,19 @@ CREATE TABLE `geni_resources` (
`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',
`rspec_idx` mediumint(8) unsigned default NULL,
PRIMARY KEY (`idx`),
UNIQUE KEY `manager` (`exptidx`,`manager_urn`(255))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `geni_rspecs`;
CREATE TABLE `geni_rspecs` (
`idx` int(10) unsigned NOT NULL auto_increment,
`created` datetime default NULL,
`rspec` text,
PRIMARY KEY (`idx`),
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `geni_bindings`;
CREATE TABLE `geni_bindings` (
`slice_uuid` varchar(40) NOT NULL default '',
......
#
#
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
if (!DBTableExists("geni_rspecs")) {
DBQueryFatal("CREATE TABLE `geni_rspecs` ( ".
" `idx` int(10) unsigned NOT NULL auto_increment, ".
" `created` datetime default NULL, ".
" `rspec` text, ".
" PRIMARY KEY (`idx`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
DBQueryFatal("alter table `geni_resources` " .
"add column `rspec_idx` mediumint(8) unsigned default NULL")
unless DBSlotExists("geni_resources", "rspec_idx");
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