Subversion Repositories computer_asset_manager_v2

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 rodolico 1
create table connection_types (
2
	id				int unsigned not null auto_incrememt,
3
	name			varchar(64) comment 'name of the connection such as network or power',
4
	primary key		(id)
5
) comment 'keeps names of different types of connections';
6
 
7
insert into connection_types( name ) values ('network');
8
insert into connection_types( name ) values ('power');
9
insert into connection_types( name ) values ('serial console');
10
 
11
create table connections (
12
	id				int unsigned not null auto_incrememt,
13
	device1_id		int unsigned not null references devices(id),
14
	device2_id		int unsigned not null references devices(id),
15
	device1_port	varchar(20) comment 'name of port on device1',
16
	device2_port	varchar(20) comment 'name of port on device2',
17
	connection_type_id	int unsigned not null references connection_types( id),
18
	notes			text comment 'any notes such as cable type/color',
19
	primary key		(id),
20
) comment 'makes connections between devices including power and network';