Commit 98ed9445 authored by Leigh Stoller's avatar Leigh Stoller

Add new table, reserved_vlantags for pre reserving the tags that

vlans will later use when instantiated. Needed for protogeni.
parent abec5870
......@@ -3266,6 +3266,27 @@ CREATE TABLE `reserved` (
KEY `old_exptidx` (`old_exptidx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `scheduled_reloads`
--
DROP TABLE IF EXISTS `reserved_vlantags`;
CREATE TABLE `reserved_vlantags` (
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`lanid` int(11) NOT NULL default '0',
`vname` varchar(128) NOT NULL default '',
`tag` smallint(5) NOT NULL default '0',
`reserve_time` datetime default NULL,
`locked` datetime default NULL,
`state` varchar(32) NOT NULL default '',
PRIMARY KEY (`exptidx`,`lanid`,`tag`),
UNIQUE KEY `vname` (`pid`,`eid`,`vname`,`tag`),
UNIQUE KEY `lanid` (`pid`,`eid`,`lanid`,`tag`),
UNIQUE KEY `tag` (`tag`),
KEY `id` (`lanid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `scheduled_reloads`
--
......
#
# Add reserved_vlantags table
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("reserved_vlantags")) {
DBQueryFatal("CREATE TABLE `reserved_vlantags` ( ".
" `pid` varchar(12) NOT NULL default '', ".
" `eid` varchar(32) NOT NULL default '', ".
" `exptidx` int(11) NOT NULL default '0', ".
" `lanid` int(11) NOT NULL default '0', ".
" `vname` varchar(128) NOT NULL default '', ".
" `tag` smallint(5) NOT NULL default '0', ".
" `reserve_time` datetime default NULL, ".
" `locked` datetime default NULL, ".
" `state` varchar(32) NOT NULL default '', ".
" PRIMARY KEY (`exptidx`,`lanid`,`tag`), ".
" UNIQUE KEY `vname` (`pid`,`eid`,`vname`,`tag`), ".
" UNIQUE KEY `lanid` (`pid`,`eid`,`lanid`,`tag`), ".
" UNIQUE KEY `tag` (`tag`), ".
" KEY `id` (`lanid`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
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