sql: Fix Zones are returned in a random order (#3934) (#4494)

This commit is contained in:
Wei Zhou 2020-11-25 11:00:43 +01:00 committed by GitHub
parent e9ce381c56
commit 4fb69e695c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -837,3 +837,6 @@ UPDATE `cloud`.`guest_os` SET category_id = 7 WHERE id = 275 AND display_name =
-- Add flag 'hidden' in tables usage_ip_address and cloud_usage
ALTER TABLE `cloud_usage`.`usage_ip_address` ADD COLUMN `is_hidden` smallint(1) NOT NULL DEFAULT '0' COMMENT 'is usage hidden';
ALTER TABLE `cloud_usage`.`cloud_usage` ADD COLUMN `is_hidden` smallint(1) NOT NULL DEFAULT '0' COMMENT 'is usage hidden';
-- Fix Zones are returned in a random order (#3934)
UPDATE `cloud`.`data_center` JOIN (SELECT COUNT(1) AS count FROM `cloud`.`data_center` WHERE `sort_key` != 0) AS tbl_tmp SET `sort_key` = `id` WHERE count = 0;