Added datetime column for disk_speed

Will be used for YABs history feature
This commit is contained in:
cp6 2021-01-21 14:31:56 +11:00
parent 725fde2298
commit efe2bd72e0
2 changed files with 15 additions and 12 deletions

View File

@ -14,18 +14,19 @@ USE `idlers`;
CREATE TABLE IF NOT EXISTS `disk_speed` CREATE TABLE IF NOT EXISTS `disk_speed`
( (
`server_id` char(8) NOT NULL, `server_id` char(8) NOT NULL,
`4k` float DEFAULT NULL, `4k` float DEFAULT NULL,
`4k_type` char(4) DEFAULT NULL, `4k_type` char(4) DEFAULT NULL,
`4k_as_mbps` float DEFAULT NULL, `4k_as_mbps` float DEFAULT NULL,
`64k` float DEFAULT NULL, `64k` float DEFAULT NULL,
`64k_type` char(4) DEFAULT NULL, `64k_type` char(4) DEFAULT NULL,
`64k_as_mbps` float DEFAULT NULL, `64k_as_mbps` float DEFAULT NULL,
`512k` float DEFAULT NULL, `512k` float DEFAULT NULL,
`512k_type` char(4) DEFAULT NULL, `512k_type` char(4) DEFAULT NULL,
`512k_as_mbps` float DEFAULT NULL, `512k_as_mbps` float DEFAULT NULL,
`1m` float DEFAULT NULL, `1m` float DEFAULT NULL,
`1m_type` char(4) DEFAULT NULL, `1m_type` char(4) DEFAULT NULL,
`1m_as_mbps` float DEFAULT NULL, `1m_as_mbps` float DEFAULT NULL,
`datetime` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`server_id`) PRIMARY KEY (`server_id`)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = latin1; DEFAULT CHARSET = latin1;

2
update.sql Normal file
View File

@ -0,0 +1,2 @@
ALTER TABLE `disk_speed`
ADD COLUMN `datetime` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `1m_as_mbps`;