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



##########
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:
       excuse my ignorance. why not just 
   ```
   UPDATE `cloud`.`data_center` SET `sort_key` = `id` WHERE `sort_key` = 0;
   ```
   this seems like it going to work as well, but i'm missing the point, i 
guess. at worst the first in the sortorder has to be put back at the fron, but 
this should be a onetime effort.




----------------------------------------------------------------
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