603 916 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# 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: