Update nw_rate & mc_rate to int unsigned to allow rates > 65Gbps (#13380)
* update column type
* Apply suggestion from @DaanHoogland
Co-authored-by: dahn <daan@onecht.net>
---------
Co-authored-by: Daan Hoogland <daan@onecht.net>
Co-authored-by: Pearl Dsilva <pearl1954@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Co-authored-by: Harikrishna <harikrishna.patnala@gmail.com>
diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
index 97c4011..3c43413 100644
--- a/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
+++ b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
@@ -457,6 +457,15 @@
-- Add description for secondary IP addresses
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.nic_secondary_ips', 'description', 'VARCHAR(2048) DEFAULT NULL');
+--- Change nw_rate and mc_rate column types from smallint unsigned to int unsigned to support larger rate values
+ALTER TABLE `cloud`.`service_offering`
+ MODIFY COLUMN `nw_rate` int unsigned DEFAULT 200 COMMENT 'network rate throttle mbits/s',
+ MODIFY COLUMN `mc_rate` int unsigned DEFAULT 10 COMMENT 'mcast rate throttle mbits/s';
+
+ALTER TABLE `cloud`.`network_offerings`
+ MODIFY COLUMN `nw_rate` int unsigned COMMENT 'network rate throttle mbits/s',
+ MODIFY COLUMN `mc_rate` int unsigned COMMENT 'mcast rate throttle mbits/s';
+
-- Soft delete port forwarding, load balancing and firewall rules
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.firewall_rules', 'removed', 'datetime DEFAULT NULL');
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.load_balancer_vm_map', 'removed', 'datetime DEFAULT NULL');