Subversion Repositories computer_asset_manager_v2

Rev

Rev 1 | Blame | Last modification | View Log | Download | RSS feed

create table connection_types (
        id                              int unsigned not null auto_incrememt,
        name                    varchar(64) comment 'name of the connection such as network or power',
        primary key             (id)
) comment 'keeps names of different types of connections';

insert into connection_types( name ) values ('network');
insert into connection_types( name ) values ('power');
insert into connection_types( name ) values ('serial console');

create table connections (
        id                              int unsigned not null auto_incrememt,
        device1_id              int unsigned not null references devices(id),
        device2_id              int unsigned not null references devices(id),
        device1_port    varchar(20) comment 'name of port on device1',
        device2_port    varchar(20) comment 'name of port on device2',
        connection_type_id      int unsigned not null references connection_types( id),
        notes                   text comment 'any notes such as cable type/color',
        primary key             (id),
) comment 'makes connections between devices including power and network';