nvazquez commented on a change in pull request #5565:
URL: https://github.com/apache/cloudstack/pull/5565#discussion_r726079135



##########
File path: 
engine/schema/src/main/resources/META-INF/db/schema-41520to41600-cleanup.sql
##########
@@ -19,4 +19,4 @@
 -- Schema upgrade cleanup from 4.15.2.0 to 4.16.0.0
 --;
 
-ALTER TABLE `cloud`.`ssh_keypairs` MODIFY COLUMN `uuid` varchar(40) NOT NULL 
UNIQUE;

Review comment:
       Please check my comment below, that won't be good as @davidjumani has 
pointed out, all the keypairs will get the same UUID after that UPDATE 
statement. That's why those are being assigned on the iteration in java code 
in: 
https://github.com/apache/cloudstack/pull/5103/commits/7c7925edb12ab670dbe5e018d0ada36c616bd0a7#diff-06996fafc77d65da40b9caead01b27f56da70143795cd7b261840ada0727883bR70.
   
   Perhaps the solution may be:
   - Removing the code in the cleanup script
   - Defining the uuid column as not null with a default value, say `''`
   - In the java code 
https://github.com/apache/cloudstack/blob/main/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java#L73
 change the SELECT query looking for that default value




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

To unsubscribe, e-mail: [email protected]

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


Reply via email to