|
|
@ -7,11 +7,6 @@ CREATE TABLE asset ( |
|
|
|
PRIMARY KEY (asset_id) |
|
|
|
PRIMARY KEY (asset_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO asset (asset_name, assetclass_id) VALUES |
|
|
|
|
|
|
|
('My Computer', 1), |
|
|
|
|
|
|
|
('My Server', 2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE assetclass ( |
|
|
|
CREATE TABLE assetclass ( |
|
|
|
assetclass_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
assetclass_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
assetclassgroup_id int(10) NOT NULL, |
|
|
|
assetclassgroup_id int(10) NOT NULL, |
|
|
@ -19,11 +14,6 @@ CREATE TABLE assetclass ( |
|
|
|
PRIMARY KEY (assetclass_id) |
|
|
|
PRIMARY KEY (assetclass_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO assetclass (assetclassgroup_id, assetclass_name) VALUES |
|
|
|
|
|
|
|
(1, 'PC'), |
|
|
|
|
|
|
|
(2, 'Server'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE assetclassgroup ( |
|
|
|
CREATE TABLE assetclassgroup ( |
|
|
|
assetclassgroup_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
assetclassgroup_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
assetclassgroup_name varchar(100) NOT NULL, |
|
|
|
assetclassgroup_name varchar(100) NOT NULL, |
|
|
@ -31,11 +21,6 @@ CREATE TABLE assetclassgroup ( |
|
|
|
PRIMARY KEY (assetclassgroup_id) |
|
|
|
PRIMARY KEY (assetclassgroup_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO assetclassgroup (assetclassgroup_name, assetclassgroup_color) VALUES |
|
|
|
|
|
|
|
('Workstations', '000000'), |
|
|
|
|
|
|
|
('Servers', '0000CC'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE location ( |
|
|
|
CREATE TABLE location ( |
|
|
|
location_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
location_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
location_name varchar(100) NOT NULL, |
|
|
|
location_name varchar(100) NOT NULL, |
|
|
@ -46,10 +31,6 @@ CREATE TABLE location ( |
|
|
|
KEY location_sort (location_sort) |
|
|
|
KEY location_sort (location_sort) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO location (location_name, location_parent) VALUES |
|
|
|
|
|
|
|
('Main Office', 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE nat ( |
|
|
|
CREATE TABLE nat ( |
|
|
|
nat_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
nat_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
nat_type int(1) NOT NULL, |
|
|
|
nat_type int(1) NOT NULL, |
|
|
@ -72,11 +53,6 @@ CREATE TABLE node ( |
|
|
|
PRIMARY KEY (node_id) |
|
|
|
PRIMARY KEY (node_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO node (node_ip, node_mac, subnet_id, asset_id) VALUES |
|
|
|
|
|
|
|
('192.168.1.2', '001122334455', 1, 1), |
|
|
|
|
|
|
|
('192.168.1.1', 'aabbccddeeff', 1, 2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE subnet ( |
|
|
|
CREATE TABLE subnet ( |
|
|
|
subnet_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnet_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnet_address varchar(45) NOT NULL, |
|
|
|
subnet_address varchar(45) NOT NULL, |
|
|
@ -89,10 +65,6 @@ CREATE TABLE subnet ( |
|
|
|
PRIMARY KEY (subnet_id) |
|
|
|
PRIMARY KEY (subnet_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO subnet (subnet_address, subnet_mask) VALUES |
|
|
|
|
|
|
|
('192.168.0.0', 24); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE subnetlocation ( |
|
|
|
CREATE TABLE subnetlocation ( |
|
|
|
subnetlocation_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnetlocation_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnet_id int(10) NOT NULL, |
|
|
|
subnet_id int(10) NOT NULL, |
|
|
@ -100,7 +72,6 @@ CREATE TABLE subnetlocation ( |
|
|
|
PRIMARY KEY (subnetlocation_id) |
|
|
|
PRIMARY KEY (subnetlocation_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE subnetvlan ( |
|
|
|
CREATE TABLE subnetvlan ( |
|
|
|
subnetvlan_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnetvlan_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
subnet_id int(10) NOT NULL, |
|
|
|
subnet_id int(10) NOT NULL, |
|
|
@ -108,10 +79,6 @@ CREATE TABLE subnetvlan ( |
|
|
|
PRIMARY KEY (subnetvlan_id) |
|
|
|
PRIMARY KEY (subnetvlan_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO subnetvlan (subnet_id, vlan_id) VALUES |
|
|
|
|
|
|
|
(1, 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE user ( |
|
|
|
CREATE TABLE user ( |
|
|
|
user_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
user_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
user_name varchar(100) NOT NULL, |
|
|
|
user_name varchar(100) NOT NULL, |
|
|
@ -137,9 +104,8 @@ CREATE TABLE user ( |
|
|
|
PRIMARY KEY (user_id) |
|
|
|
PRIMARY KEY (user_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO user (user_name, user_pass, user_displayname, user_imagesize, user_imagecount, user_mac, user_dateformat, user_menu_assets, user_menu_assetclasses, user_menu_assetclassgroups, user_menu_locations, user_menu_nodes, user_menu_subnets, user_menu_users, user_menu_vlans) VALUES |
|
|
|
INSERT INTO user (user_name, user_pass, user_displayname) VALUES |
|
|
|
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator', 6, 64, 'xxxxxxxxxxxx', 'd M Y H:i', 'on', 'on', 'on', 'on', 'on', 'on', 'on', 'on'); |
|
|
|
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE vlan ( |
|
|
|
CREATE TABLE vlan ( |
|
|
|
vlan_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
vlan_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
@ -149,10 +115,6 @@ CREATE TABLE vlan ( |
|
|
|
PRIMARY KEY (vlan_id) |
|
|
|
PRIMARY KEY (vlan_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO vlan (vlan_number, vlan_name) VALUES |
|
|
|
|
|
|
|
(1, 'DEFAULT_VLAN'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE zone ( |
|
|
|
CREATE TABLE zone ( |
|
|
|
zone_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
zone_id int(10) NOT NULL AUTO_INCREMENT, |
|
|
|
zone_soa varchar(40) CHARACTER SET utf8 NOT NULL, |
|
|
|
zone_soa varchar(40) CHARACTER SET utf8 NOT NULL, |
|
|
@ -172,6 +134,3 @@ CREATE TABLE zone ( |
|
|
|
zone_info text CHARACTER SET utf8 DEFAULT NULL, |
|
|
|
zone_info text CHARACTER SET utf8 DEFAULT NULL, |
|
|
|
PRIMARY KEY (zone_id) |
|
|
|
PRIMARY KEY (zone_id) |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO zone (zone_soa, zone_origin, zone_hostmaster, zone_serial, zone_ns1) VALUES |
|
|
|
|
|
|
|
('ns1.example.com.', 'example.com.', 'hostmaster@example.com', '2023021301', 'ns1.example.com'); |
|
|
|
|
|
|
|