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

New logical wires table, new implementation coming.

parent fb0e4429
......@@ -2976,6 +2976,23 @@ CREATE TABLE `logfile_metadata` (
KEY `headervalue` (`metakey`(64),`metaval`(128))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `logical_wires`
--
DROP TABLE IF EXISTS `logical_wires`;
CREATE TABLE `logical_wires` (
`type` enum('Node','Trunk','Unused') NOT NULL default 'Unused',
`node_id1` char(32) NOT NULL default '',
`iface1` char(128) NOT NULL default '',
`physiface1` char(128) NOT NULL default '',
`node_id2` char(32) NOT NULL default '',
`iface2` char(128) NOT NULL default '',
`physiface2` char(128) NOT NULL default '',
PRIMARY KEY (`node_id1`,`iface1`,`node_id2`,`iface2`),
UNIQUE KEY `physiface` (`node_id1`,`physiface1`,`node_id2`,`physiface2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `login`
--
......
#
# New logical wire implementation.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("logical_wires")) {
DBQueryFatal("CREATE TABLE `logical_wires` ( ".
" `type` enum('Node','Trunk','Unused') NOT NULL ".
" default 'Unused', ".
" `node_id1` char(32) NOT NULL default '', ".
" `iface1` char(128) NOT NULL default '', ".
" `physiface1` char(128) NOT NULL default '', ".
" `node_id2` char(32) NOT NULL default '', ".
" `iface2` char(128) NOT NULL default '', ".
" `physiface2` char(128) NOT NULL default '', ".
" PRIMARY KEY (`node_id1`,`iface1`,`node_id2`,`iface2`),".
"UNIQUE KEY `physiface` ".
" (`node_id1`,`physiface1`,`node_id2`,`physiface2`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1 ");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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