DaanHoogland commented on a change in pull request #4494:
URL: https://github.com/apache/cloudstack/pull/4494#discussion_r528683503



##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41400to41500.sql
##########
@@ -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;

Review comment:
       so in the case above, `sort_key` is only changed if there is no 
`sort_key != 0`. This would mean that if there are three where it is 0 and one 
where it is 10, nothing gets changed, does it?
   
   if this is at all possible btw!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to