From a7000034a681975148e1d2e5aff1d8e259f64520 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 11 Oct 2024 12:13:41 +0200 Subject: [PATCH] schema: allow for VMs with 256+ cores fixes #555 --- schema/mysql-migrations/upgrade_61.sql | 6 ++++++ schema/mysql.sql | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 schema/mysql-migrations/upgrade_61.sql diff --git a/schema/mysql-migrations/upgrade_61.sql b/schema/mysql-migrations/upgrade_61.sql new file mode 100644 index 00000000..38e1b4d7 --- /dev/null +++ b/schema/mysql-migrations/upgrade_61.sql @@ -0,0 +1,6 @@ +ALTER TABLE virtual_machine + MODIFY COLUMN hardware_numcpu SMALLINT UNSIGNED NULL DEFAULT NULL; + +INSERT INTO vspheredb_schema_migration + (schema_version, migration_time) + VALUES (61, NOW()); diff --git a/schema/mysql.sql b/schema/mysql.sql index 14f585aa..ff21a392 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -363,7 +363,7 @@ CREATE TABLE virtual_machine ( uuid VARBINARY(16) NOT NULL, vcenter_uuid VARBINARY(16) NOT NULL, hardware_memorymb INT UNSIGNED NULL DEFAULT NULL, - hardware_numcpu TINYINT UNSIGNED NULL DEFAULT NULL, + hardware_numcpu SMALLINT UNSIGNED NULL DEFAULT NULL, hardware_numcorespersocket TINYINT UNSIGNED NULL DEFAULT 1, template ENUM('y', 'n') NULL DEFAULT NULL, -- TODO: drop and skip templates? Or separate table? instance_uuid VARCHAR(64) DEFAULT NULL, -- 5004890e-8edd-fe5f-d116-d5704b2043e4 @@ -956,4 +956,4 @@ CREATE TABLE counter_300x5 ( INSERT INTO vspheredb_schema_migration (schema_version, migration_time) -VALUES (60, NOW()); +VALUES (61, NOW());