Commit b42affd8 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Update to previous revision.

parent 8d3f6875
......@@ -615,7 +615,8 @@ sub RecordHistory($$)
" created,now(),$expired, ".
" extension_count,extension_days, ".
" physnode_count,virtnode_count, ".
" servername,rspec,script,paramdefs,params,manifest ".
" servername,repourl,reponame,repohash, ".
" rspec,script,paramdefs,params,manifest ".
" from apt_instances where uuid='$uuid'")
or return -1;
......
......@@ -261,6 +261,9 @@ CREATE TABLE `apt_instance_history` (
`physnode_count` smallint(5) unsigned NOT NULL default '0',
`virtnode_count` smallint(5) unsigned NOT NULL default '0',
`servername` tinytext,
`repourl` tinytext,
`reponame` varchar(40) default NULL,
`repohash` varchar(64) default NULL,
`rspec` mediumtext,
`script` mediumtext,
`paramdefs` mediumtext,
......@@ -317,6 +320,9 @@ CREATE TABLE `apt_instances` (
`logfileid` varchar(40) default NULL,
`cert` mediumtext,
`privkey` mediumtext,
`repourl` tinytext,
`reponame` varchar(40) default NULL,
`repohash` varchar(64) default NULL,
`rspec` mediumtext,
`script` mediumtext,
`paramdefs` mediumtext,
......
......@@ -16,7 +16,7 @@ sub DoUpdate($$$)
" 'default:tinytext',0,0,NULL)");
DBQueryFatal("replace INTO table_regex VALUES ".
" ('apt_profiles','repohash','text','regex', ".
" '^[\\\\w]+\$',0,0,NULL)");
" '^[\\\\w]+\$',0,64,NULL)");
if (!DBSlotExists("apt_instances", "script")) {
DBQueryFatal("alter table apt_instances " .
......@@ -28,6 +28,18 @@ sub DoUpdate($$$)
" add `script` mediumtext after rspec, ".
" add `paramdefs` mediumtext after script");
}
if (!DBSlotExists("apt_instances", "repourl")) {
DBQueryFatal("alter table apt_instances " .
" add `repourl` tinytext after privkey, ".
" add `reponame` varchar(40) default NULL after repourl, ".
" add `repohash` varchar(64) default NULL after reponame");
}
if (!DBSlotExists("apt_instance_history", "repourl")) {
DBQueryFatal("alter table apt_instance_history " .
" add `repourl` tinytext after servername, ".
" add `reponame` varchar(40) default NULL after repourl, ".
" add `repohash` varchar(64) default NULL after reponame");
}
return 0;
}
......
Supports Markdown
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