IP Reg is a IPAM tool to keep track of assets, nodes (IP addresses, MAC addresses, DNS aliases) within different subnets, over different locations or even VLAN's. Written in PHP, used with a MySQL-database to have a unique insight in your local network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
ipreg/install/install.sql

136 lines
3.8 KiB

--
-- Table structure for table `asset`
--
CREATE TABLE `asset` (
`asset_id` int(10) NOT NULL auto_increment,
`asset_name` varchar(100) NOT NULL default '',
`hostname` varchar(100) NOT NULL default '',
`assetclass_id` int(10) NOT NULL default '0',
`asset_info` text NOT NULL,
PRIMARY KEY (`asset_id`)
) ;
--
-- Table structure for table `assetclass`
--
CREATE TABLE `assetclass` (
`assetclass_id` int(10) NOT NULL auto_increment,
`assetclassgroup_id` int(10) NOT NULL default '0',
`assetclass_name` varchar(100) NOT NULL default '',
PRIMARY KEY (`assetclass_id`)
) ;
INSERT INTO `assetclass` VALUES ('', 1, 'Access device');
INSERT INTO `assetclass` VALUES ('', 1, 'Firewall');
INSERT INTO `assetclass` VALUES ('', 1, 'HUB');
INSERT INTO `assetclass` VALUES ('', 1, 'Router');
INSERT INTO `assetclass` VALUES ('', 1, 'Switch');
INSERT INTO `assetclass` VALUES ('', 2, 'Server');
INSERT INTO `assetclass` VALUES ('', 2, 'NAS');
INSERT INTO `assetclass` VALUES ('', 3, 'IP Phone');
INSERT INTO `assetclass` VALUES ('', 4, 'Laptop');
INSERT INTO `assetclass` VALUES ('', 4, 'PC');
INSERT INTO `assetclass` VALUES ('', 4, 'Printer');
INSERT INTO `assetclass` VALUES ('', 4, 'Thin Client');
--
-- Table structure for table `assetclassgroup`
--
CREATE TABLE `assetclassgroup` (
`assetclassgroup_id` int(10) NOT NULL auto_increment,
`assetclassgroup_name` varchar(100) NOT NULL default '',
`color` varchar(10) NOT NULL default '',
PRIMARY KEY (`assetclassgroup_id`)
) ;
INSERT INTO `assetclassgroup` VALUES ('', 'Network', 'green');
INSERT INTO `assetclassgroup` VALUES ('', 'Servers', 'red');
INSERT INTO `assetclassgroup` VALUES ('', 'VOIP', 'orange');
INSERT INTO `assetclassgroup` VALUES ('', 'Workstations', 'blue');
INSERT INTO `assetclassgroup` VALUES ('', 'Other', 'black');
--
-- Table structure for table `location`
--
CREATE TABLE `location` (
`location_id` int(10) NOT NULL auto_increment,
`location_name` varchar(100) NOT NULL default '',
`parent` int(1) NOT NULL default '0',
`location_info` text NOT NULL,
PRIMARY KEY (`location_id`)
) ;
--
-- Table structure for table `node`
--
CREATE TABLE `node` (
`node_id` int(10) NOT NULL auto_increment,
`ip` varchar(15) NOT NULL default '',
`mac` varchar(12) NOT NULL default '',
`dns1` varchar(100) NOT NULL default '',
`dns2` varchar(100) NOT NULL default '',
`subnet_id` int(10) NOT NULL default '0',
`asset_id` int(10) NOT NULL default '0',
`node_info` text NOT NULL,
PRIMARY KEY (`node_id`)
) ;
--
-- Table structure for table `subnet`
--
CREATE TABLE `subnet` (
`subnet_id` int(10) NOT NULL auto_increment,
`subnet_address` varchar(15) NOT NULL default '',
`subnet_mask` int(2) NOT NULL default '0',
`vlan_id` int(10) NOT NULL default '0',
`subnet_info` text NOT NULL,
PRIMARY KEY (`subnet_id`)
) ;
--
-- Table structure for table `subnetlocation`
--
CREATE TABLE `subnetlocation` (
`subnetlocation_id` int(10) NOT NULL auto_increment,
`subnet_id` int(10) NOT NULL default '0',
`location_id` int(10) NOT NULL default '0',
PRIMARY KEY (`subnetlocation_id`)
) ;
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`user_id` int(10) NOT NULL auto_increment,
`user_name` varchar(100) NOT NULL default '',
`user_pass` varchar(32) NOT NULL default '',
`user_level` int(1) NOT NULL default '0',
`displayname` varchar(100) NOT NULL default '',
PRIMARY KEY (`user_id`)
) ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 2, 'admin');
--
-- Table structure for table `vlan`
--
CREATE TABLE `vlan` (
`vlan_id` int(10) NOT NULL auto_increment,
`vlan_number` int(3) NOT NULL default '0',
`vlan_name` varchar(100) NOT NULL default '',
`vlan_info` text NOT NULL,
PRIMARY KEY (`vlan_id`)
) ;