Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a6619ae6
Commit
a6619ae6
authored
Sep 12, 2017
by
Leigh B Stoller
Browse files
New logical wires table, new implementation coming.
parent
fb0e4429
Changes
2
Hide whitespace changes
Inline
Side-by-side
sql/database-create.sql
View file @
a6619ae6
...
...
@@ -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`
--
...
...
sql/updates/4/603
0 → 100644
View file @
a6619ae6
#
# 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:
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment