Subsequent fixes after major changes for PDO
This commit is contained in:
+38
-3
@@ -4,6 +4,9 @@ CREATE TABLE asset (
|
||||
asset_hostname varchar(100) DEFAULT NULL,
|
||||
assetclass_id int(10) NOT NULL,
|
||||
asset_info text DEFAULT NULL,
|
||||
asset_intf smallint(5) UNSIGNED NOT NULL DEFAULT 1,
|
||||
asset_location int(10) DEFAULT NULL,
|
||||
asset_type enum ('active','passive') NOT NULL DEFAULT 'active',
|
||||
PRIMARY KEY (asset_id),
|
||||
INDEX ix_asset_name (asset_name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
@@ -20,16 +23,44 @@ CREATE TABLE assetclassgroup (
|
||||
assetclassgroup_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
assetclassgroup_name varchar(100) NOT NULL,
|
||||
assetclassgroup_color varchar(6) NOT NULL DEFAULT '000000',
|
||||
assetclassgroup_description varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (assetclassgroup_id),
|
||||
INDEX ix_assetclassgroup_name (assetclassgroup_name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- WIP
|
||||
CREATE TABLE cable (
|
||||
cable_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
cable_description varchar(100) NOT NULL,
|
||||
cable_from_id int(10) DEFAULT NULL,
|
||||
cable_to_id int(10) DEFAULT NULL,
|
||||
cable_length smallint(5) UNSIGNED DEFAULT NULL,
|
||||
cable_links smallint(5) UNSIGNED DEFAULT 1,
|
||||
cable_type enum('copper','fibre','laser','radio') DEFAULT NULL,
|
||||
cable_info text DEFAULT NULL,
|
||||
PRIMARY KEY (cable_id),
|
||||
UNIQUE INDEX ix_cable_description (cable_description)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- WIP
|
||||
-- Reference to external systems
|
||||
CREATE TABLE extlink (
|
||||
extlink_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
asset_id int(10) NOT NULL,
|
||||
extlink_type enum('cdb','zabbix', 'topdesk') NOT NULL DEFAULT 'cdb',
|
||||
extlink_refid int(10) DEFAULT NULL,
|
||||
extlink_uid varchar(65) DEFAULT NULL,
|
||||
PRIMARY KEY (extlink_id),
|
||||
INDEX ix_extlink_asset_id (asset_id)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE location (
|
||||
location_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
location_name varchar(100) NOT NULL,
|
||||
location_parent int(10) NOT NULL DEFAULT 0,
|
||||
location_info text DEFAULT NULL,
|
||||
location_sort int(11) NOT NULL DEFAULT 0,
|
||||
location_type enum('location', 'building','room','rack') NOT NULL DEFAULT 'location',
|
||||
location_sort smallint(6) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (location_id),
|
||||
INDEX ix_location_sort (location_sort),
|
||||
INDEX ix_location_name (location_name)
|
||||
@@ -40,6 +71,9 @@ CREATE TABLE nat (
|
||||
nat_type int(1) NOT NULL,
|
||||
nat_ext int(10) NOT NULL,
|
||||
nat_int int(10) NOT NULL,
|
||||
nat_ext_port smallint(5) UNSIGNED DEFAULT NULL,
|
||||
nat_int_port smallint(5) UNSIGNED DEFAULT NULL,
|
||||
nat_description varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (nat_id)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -85,8 +119,9 @@ CREATE TABLE subnetvlan (
|
||||
|
||||
CREATE TABLE user (
|
||||
user_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
user_realm enum ('local','ldap') NOT NULL DEFAULT 'local',
|
||||
user_name varchar(100) NOT NULL,
|
||||
user_pass varchar(32) NOT NULL,
|
||||
user_pass binary(60) NOT NULL,
|
||||
user_displayname varchar(100) NOT NULL,
|
||||
user_language char(2) NOT NULL DEFAULT 'en',
|
||||
user_imagesize int(3) NOT NULL DEFAULT 6,
|
||||
@@ -110,7 +145,7 @@ CREATE TABLE user (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO user (user_name, user_pass, user_displayname) VALUES
|
||||
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator');
|
||||
('admin', '$2y$10$HTs0lSaFrfr.q4Gmy5zWfeDg3jhYZkqEGZEnDkMiHZ641nso38mt6', 'Administrator');
|
||||
|
||||
CREATE TABLE vlan (
|
||||
vlan_id int(10) NOT NULL AUTO_INCREMENT,
|
||||
|
||||
Reference in New Issue
Block a user