Updated table for SQL

This commit is contained in:
2026-02-28 22:56:25 +01:00
parent b074b9d633
commit 1936976312

View File

@@ -25,21 +25,24 @@ SET NAMES utf8mb4;
-- New universal table type -- New universal table type
CREATE TABLE idracHOSTNAMECHANGEME ( CREATE TABLE IDRACmeasurement (
id MEDIUMINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, id MEDIUMINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
time_stamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, time_stamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
hostname TEXT(30), hostname VARCHAR(64) NOT NULL,
powerDrawPSU1 FLOAT, powerDrawPSU1 DECIMAL(7,2),
powerDrawPSU2 FLOAT NULL, powerDrawPSU2 DECIMAL(7,2) NULL,
voltagePSU1 TINYINT(100), voltagePSU1 DECIMAL(7,2),
voltagePSU2 TINYINT(100) NULL, voltagePSU2 DECIMAL(7,2) NULL,
inletTemp FLOAT, inletTemp DECIMAL(5,2),
exhaustTemp FLOAT, exhaustTemp DECIMAL(5,2),
cpu1Temp FLOAT, cpu1Temp DECIMAL(5,2),
cpu2Temp FLOAT NULL, cpu2Temp DECIMAL(5,2) NULL,
uptimeH INT , uptimeS BIGINT,
uptimeD FLOAT NULL uptimeH DECIMAL(8,3),
uptimeD DECIMAL(8,3) NULL,
INDEX idx_time (time_stamp),
INDEX idx_host_time (hostname, time_stamp)
); );
CREATE TABLE fansHOSTNAMEHERE ( CREATE TABLE fansHOSTNAMEHERE (