Skip to content

Commit

Permalink
Updating create.sql to match update file
Browse files Browse the repository at this point in the history
  • Loading branch information
wilpig committed Aug 3, 2014
1 parent 1c59171 commit 7dd190a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 56 deletions.
66 changes: 11 additions & 55 deletions create.sql
Expand Up @@ -294,24 +294,10 @@ CREATE TABLE fac_Device (
HalfDepth tinyint(1) NOT NULL DEFAULT '0',
BackSide tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (DeviceID),
KEY SerialNo (SerialNo,`AssetTag`,`PrimaryIP`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
-- Table structure for table fac_DevicePorts
--

DROP TABLE IF EXISTS fac_DevicePorts;
CREATE TABLE fac_DevicePorts (
ConnectionID int(11) NOT NULL AUTO_INCREMENT,
DeviceID int(11),
DevicePort int(11),
MediaID int(11),
PortDescriptor varchar(30),
ColorID int(11),
Notes text NULL,
PRIMARY KEY (ConnectionID),
KEY DeviceID (DeviceID,DevicePort)
KEY SerialNo (SerialNo,`AssetTag`,`PrimaryIP`),
KEY AssetTag (AssetTag),
KEY Cabinet (Cabinet),
KEY TemplateID (TemplateID)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
Expand Down Expand Up @@ -446,24 +432,6 @@ CREATE TABLE fac_PanelSchedule (
PRIMARY KEY (PanelID)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
-- Table structure for table fac_PatchConnection
--

DROP TABLE IF EXISTS fac_PatchConnection;
CREATE TABLE fac_PatchConnection (
PanelDeviceID int(11) NOT NULL,
PanelPortNumber int(11) NOT NULL,
FrontEndpointDeviceID int(11) DEFAULT NULL,
FrontEndpointPort int(11) DEFAULT NULL,
RearEndpointDeviceID int(11) DEFAULT NULL,
RearEndpointPort int(11) DEFAULT NULL,
FrontNotes varchar(80) DEFAULT NULL,
RearNotes varchar(80) DEFAULT NULL,
PRIMARY KEY (PanelDeviceID,PanelPortNumber)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


--
-- Table structure for table fac_PDUStats
--
Expand All @@ -483,7 +451,7 @@ create table fac_PDUStats(
DROP TABLE IF EXISTS fac_PowerConnection;
CREATE TABLE fac_PowerConnection (
PDUID int(11) NOT NULL,
PDUPosition int(11) NOT NULL,
PDUPosition VARCHAR(11) NOT NULL,
DeviceID int(11) NOT NULL,
DeviceConnNumber int(11) NOT NULL,
UNIQUE KEY PDUID (PDUID,PDUPosition),
Expand All @@ -510,7 +478,9 @@ CREATE TABLE fac_PowerDistribution (
FailSafe tinyint(1) NOT NULL,
PanelID2 int(11) NOT NULL,
PanelPole2 int(11) NOT NULL,
PRIMARY KEY (PDUID)
PRIMARY KEY (PDUID),
KEY CabinetID (CabinetID),
KEY PanelID (PanelID)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
Expand Down Expand Up @@ -576,22 +546,6 @@ CREATE TABLE fac_RackRequest (
KEY RequestorID (RequestorID)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

--
-- Table structure for table fac_SwitchConnection
--

DROP TABLE IF EXISTS fac_SwitchConnection;
CREATE TABLE fac_SwitchConnection (
SwitchDeviceID int(11) NOT NULL,
SwitchPortNumber int(11) NOT NULL,
EndpointDeviceID int(11) NOT NULL,
EndpointPort int(11) NOT NULL,
Notes varchar(80) NOT NULL,
PRIMARY KEY (SwitchDeviceID,SwitchPortNumber),
UNIQUE KEY EndpointDeviceID (EndpointDeviceID,EndpointPort),
UNIQUE KEY SwitchDeviceID (SwitchDeviceID,SwitchPortNumber)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table fac_Tags
--
Expand Down Expand Up @@ -848,7 +802,9 @@ INSERT INTO fac_Config VALUES
('HumidityRedHigh', '75', 'percentage', 'float', '75'),
('HumidityRedLow', '35', 'percentage', 'float', '35'),
('HumidityYellowHigh', '55', 'percentage', 'float', '55'),
('HumidityYellowLow', '45', 'percentage', 'float', '45'),
('HumidityYellowLow', '45', 'percentage', 'float', '45'),
('WorkOrderBuilder', 'disabled', 'Enabled/Disabled', 'string', 'Disabled'),
('RackRequests', 'enabled', 'Enabled/Disabled', 'string', 'Enabled'),
('dot', '/usr/bin/dot', 'path', 'string', '/usr/bin/dot')
;

Expand Down
3 changes: 2 additions & 1 deletion db-3.2-to-3.3.sql
Expand Up @@ -32,7 +32,8 @@ ALTER TABLE fac_Device ADD INDEX TemplateID(TemplateID);
-- Clean up - we transitioned off of this table 2 releases ago
--
DROP TABLE IF EXISTS fac_DevicePorts;

DROP TABLE IF EXISTS fac_PatchConnection;
DROP TABLE IF EXISTS fac_SwitchConnection;
--
-- Bump up the database version
--
Expand Down

0 comments on commit 7dd190a

Please sign in to comment.