213 lines
6.4 KiB
SQL
213 lines
6.4 KiB
SQL
--
|
|
-- Database: `ipreg`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
|
|
|
--
|
|
-- Dumping data for table `asset`
|
|
--
|
|
|
|
INSERT INTO `asset` VALUES (1, 'My Router', 'Router', 4, 'This is my router');
|
|
INSERT INTO `asset` VALUES (2, 'My PC', 'PC', 10, 'This is my workstation');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
|
|
|
|
--
|
|
-- Dumping data for table `assetclass`
|
|
--
|
|
|
|
INSERT INTO `assetclass` VALUES (1, 1, 'Access device');
|
|
INSERT INTO `assetclass` VALUES (2, 1, 'Firewall');
|
|
INSERT INTO `assetclass` VALUES (3, 1, 'HUB');
|
|
INSERT INTO `assetclass` VALUES (4, 1, 'Router');
|
|
INSERT INTO `assetclass` VALUES (5, 1, 'Switch');
|
|
INSERT INTO `assetclass` VALUES (6, 2, 'Server');
|
|
INSERT INTO `assetclass` VALUES (7, 2, 'NAS');
|
|
INSERT INTO `assetclass` VALUES (8, 3, 'IP Phone');
|
|
INSERT INTO `assetclass` VALUES (9, 4, 'Laptop');
|
|
INSERT INTO `assetclass` VALUES (10, 4, 'PC');
|
|
INSERT INTO `assetclass` VALUES (11, 4, 'Printer');
|
|
INSERT INTO `assetclass` VALUES (12, 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
|
|
|
|
--
|
|
-- Dumping data for table `assetclassgroup`
|
|
--
|
|
|
|
INSERT INTO `assetclassgroup` VALUES (1, 'Network', 'red');
|
|
INSERT INTO `assetclassgroup` VALUES (2, 'Servers', 'green');
|
|
INSERT INTO `assetclassgroup` VALUES (3, 'VOIP', 'orange');
|
|
INSERT INTO `assetclassgroup` VALUES (4, 'Workstations', 'blue');
|
|
INSERT INTO `assetclassgroup` VALUES (5, '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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
|
|
|
--
|
|
-- Dumping data for table `location`
|
|
--
|
|
|
|
INSERT INTO `location` VALUES (1, 'Head Office', 0, '');
|
|
INSERT INTO `location` VALUES (2, '1st floor', 1, '');
|
|
INSERT INTO `location` VALUES (3, '2nd floor', 1, '');
|
|
INSERT INTO `location` VALUES (4, 'Administration', 2, '');
|
|
INSERT INTO `location` VALUES (5, 'Finance', 2, '');
|
|
INSERT INTO `location` VALUES (6, 'Branch office', 0, '');
|
|
INSERT INTO `location` VALUES (7, 'Planning', 3, '');
|
|
INSERT INTO `location` VALUES (8, 'Logistics', 6, '');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
|
|
|
|
--
|
|
-- Dumping data for table `node`
|
|
--
|
|
|
|
INSERT INTO `node` VALUES (1, '192.168.0.1', 'aabbcc112233', 'router1', '', 1, 1, '');
|
|
INSERT INTO `node` VALUES (2, '192.168.0.11', 'aa11bb22cc33', 'pc1', '', 1, 2, '');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
|
|
|
--
|
|
-- Dumping data for table `subnet`
|
|
--
|
|
|
|
INSERT INTO `subnet` VALUES (1, '192.168.0.0', 24, 1, '');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
|
|
|
--
|
|
-- Dumping data for table `subnetlocation`
|
|
--
|
|
|
|
INSERT INTO `subnetlocation` VALUES (1, 1, 1);
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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',
|
|
`user_displayname` varchar(100) NOT NULL default '',
|
|
`user_mac` int(1) NOT NULL default '0',
|
|
`user_lang` varchar(3) NOT NULL default '',
|
|
PRIMARY KEY (`user_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
|
|
|
--
|
|
-- Dumping data for table `user`
|
|
--
|
|
|
|
INSERT INTO `user` VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 2, 'Administrator', 0, 'en');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- 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`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
|
|
|
--
|
|
-- Dumping data for table `vlan`
|
|
--
|
|
|
|
INSERT INTO `vlan` VALUES (1, 1, 'DEFAULT_VLAN', ''); |