You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/10/11 11:03:52 UTC
[GitHub] [cloudstack] davidjumani commented on a change in pull request #5565: engine/schema: add unique constraint for sshkeys UUID column
davidjumani commented on a change in pull request #5565:
URL: https://github.com/apache/cloudstack/pull/5565#discussion_r726014976
##########
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:
@weizhouapache
```
UPDATE `cloud`.`ssh_keypairs` SET `uuid`=UUID() WHERE `uuid` IS NULL;
```
Will add the same UUID to every key
https://github.com/apache/cloudstack/blob/main/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java#L77 should fix this issue
@rhtyd Unique constraint can still let null values exist
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org