Commit 5d29afca authored by Leigh B Stoller's avatar Leigh B Stoller

Minor consistency change to virt_node_desires table; change length

of desire to 64 chars.
parent 610170bd
......@@ -3829,7 +3829,7 @@ CREATE TABLE `virt_node_desires` (
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`vname` varchar(32) NOT NULL default '',
`desire` varchar(30) NOT NULL default '',
`desire` varchar(64) NOT NULL default '',
`weight` float default NULL,
PRIMARY KEY (`exptidx`,`vname`,`desire`),
UNIQUE KEY `pideid` (`pid`,`eid`,`vname`,`desire`)
......
......@@ -687,7 +687,7 @@ REPLACE INTO table_regex VALUES ('virt_lans','layer','int','redirect','default:t
REPLACE INTO table_regex VALUES ('virt_node_desires','pid','text','redirect','projects:pid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_node_desires','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_node_desires','vname','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_node_desires','desire','text','regex','^[\\?\\*]?[\\+\\!\\&]?[-\\w?+]+$',1,30,NULL);
REPLACE INTO table_regex VALUES ('virt_node_desires','desire','text','regex','^[\\?\\*]?[\\+\\!\\&]?[-\\w?+]+$',1,64,NULL);
REPLACE INTO table_regex VALUES ('virt_node_desires','weight','int','redirect','default:float',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','pid','text','redirect','projects:pid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_nodes','eid','text','redirect','experiments:eid',0,0,NULL);
......
use strict;
use libdb;
#
# Minor changes to virt_node_desires table.
#
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBQueryFatal("alter table virt_node_desires change desire ".
" `desire` varchar(64) NOT NULL default ''");
DBQueryFatal("update table_regex set min=1,max=64 ".
"where table_name='virt_node_desires' and ".
" column_name='desire'");
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