Rev 51 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
create table network_connection (
network_connection_id int unsigned not null auto-increment,
connector_id varchar(20) default null comment 'Use this to put things like cable number',
source_device int unsigned not null comment 'ID of the source device',
source_port varchar(20) comment 'Things like eth0, or port 1 for switches',
target_device int unsigned not null comment 'ID of target device',
target_port varchar(20) comment 'Things like eth0, or port 1 for switches',
created_date datetime,
removed_date datetime,
primary key (network_connection_id)
) comment 'Stores information about network connections between devices';
insert into network_connection select null,'Cable 09',
create table network (
network_id int unsigned not null auto_increment,
device_1 int unsigned not null references device(device_id),
port_1 varchar(16) comment 'Port it is plugged into',
device_2 int unsigned not null references device(device_id),
port_2 varchar(16) comment 'Port it is plugged into',
connector int unsigned references connectors(connector_id)
primary key (network_id)
);
create table connectors (
connectors_id int unsigned not null auto_increment,
cable varchar(16),
markings varchar(16),
primary key (connectors_id)
);