Update SQL 1.2 to 1.3
Update SQL 1.2 to 1.3
This commit is contained in:
parent
cf353906e7
commit
cb7f87edc5
31
update.sql
31
update.sql
|
@ -1,31 +0,0 @@
|
||||||
ALTER TABLE `disk_speed`
|
|
||||||
ADD COLUMN `datetime` DATETIME NULL DEFAULT CURRENT_TIMESTAMP AFTER `1m_as_mbps`;
|
|
||||||
|
|
||||||
ALTER TABLE `servers`
|
|
||||||
ADD COLUMN `ssh_port` INT(11) NULL DEFAULT '22' AFTER `os`;
|
|
||||||
|
|
||||||
ALTER TABLE `servers`
|
|
||||||
ADD COLUMN `notes` VARCHAR(255) NULL DEFAULT NULL AFTER `tags`;
|
|
||||||
|
|
||||||
ALTER TABLE `disk_speed`
|
|
||||||
DROP PRIMARY KEY;
|
|
||||||
|
|
||||||
ALTER TABLE `disk_speed`
|
|
||||||
ADD UNIQUE INDEX `Index 1` (`server_id`, `datetime`);
|
|
||||||
|
|
||||||
ALTER TABLE `servers`
|
|
||||||
ADD COLUMN `has_st` TINYINT(1) NULL DEFAULT '0' AFTER `has_yabs`;
|
|
||||||
|
|
||||||
UPDATE servers t1
|
|
||||||
JOIN
|
|
||||||
(
|
|
||||||
SELECT server_id
|
|
||||||
FROM speed_tests
|
|
||||||
GROUP BY server_id
|
|
||||||
HAVING COUNT(*) > 0
|
|
||||||
) t2
|
|
||||||
ON t1.id = t2.server_id
|
|
||||||
SET t1.has_st = 1;
|
|
||||||
|
|
||||||
ALTER TABLE `servers`
|
|
||||||
CHANGE COLUMN `bandwidth` `bandwidth` FLOAT NULL DEFAULT NULL AFTER `disk_type`;
|
|
2
update1.2to1.3.sql
Normal file
2
update1.2to1.3.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE `servers`
|
||||||
|
ADD COLUMN `label` VARCHAR(24) NULL DEFAULT NULL AFTER `hostname`;
|
Loading…
Reference in New Issue
Block a user