Skip to content

Commit

Permalink
add ElectricalMeasure creation to db
Browse files Browse the repository at this point in the history
  • Loading branch information
MorinPierre committed Jul 8, 2015
1 parent f8a57b8 commit 478c3b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ CREATE TABLE IF NOT EXISTS fac_MeasurePoint (
CREATE TABLE IF NOT EXISTS fac_ElectricalMeasurePoint (
MPID int(11) NOT NULL,
DataCenterID int(11) NOT NULL,
EnergyTypeID int(11) NOT NULL,
Category ENUM('none', 'IT', 'Cooling', 'Other Mechanical', 'UPS Input', 'UPS Output', 'Energy Reuse') NOT NULL,
UPSPowered TINYINT(1) NOT NULL,
PowerMultiplier ENUM('0.1','1','10','100') NOT NULL,
Expand Down Expand Up @@ -936,6 +937,21 @@ CREATE TABLE IF NOT EXISTS fac_ModbusElectricalMeasurePoint (
UNIQUE KEY MPID (MPID)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for fac_ElectricalMeasure
--

CREATE TABLE IF NOT EXISTS fac_ElectricalMeasure (
MPID integer(11) NOT NULL,
Wattage1 integer(11) NOT NULL,
Wattage2 integer(11) NOT NULL,
Wattage3 integer(11) NOT NULL,
Energy integer(11) NOT NULL,
Date DATETIME NOT NULL,
KEY MPID (MPID),
UNIQUE KEY (MPID, Date)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for fac_MeasurePointGroup
--
Expand Down
15 changes: 15 additions & 0 deletions db-4.1-to-PUE_DCEM.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ CREATE TABLE IF NOT EXISTS fac_ModbusElectricalMeasurePoint (
UNIQUE KEY MPID (MPID)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for fac_ElectricalMeasure
--

CREATE TABLE IF NOT EXISTS fac_ElectricalMeasure (
MPID integer(11) NOT NULL,
Wattage1 integer(11) NOT NULL,
Wattage2 integer(11) NOT NULL,
Wattage3 integer(11) NOT NULL,
Energy integer(11) NOT NULL,
Date DATETIME NOT NULL,
KEY MPID (MPID),
UNIQUE KEY (MPID, Date)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for fac_MeasurePointGroup
--
Expand Down

0 comments on commit 478c3b8

Please sign in to comment.