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 2020/08/05 08:23:10 UTC

[GitHub] [cloudstack] rhtyd commented on a change in pull request #4034: Make DB upgrade queries idempotent for convenience

rhtyd commented on a change in pull request #4034:
URL: https://github.com/apache/cloudstack/pull/4034#discussion_r465557833



##########
File path: engine/schema/src/main/resources/META-INF/db/schema-41310to41400-cleanup.sql
##########
@@ -25,4 +25,4 @@ DELETE FROM `cloud`.`configuration` WHERE name = 'host.maintenance.retries';
 UPDATE `cloud`.`storage_pool` SET path="/var/lib/libvirt/images" WHERE path="/var/lib/libvirt/images/";
 
 -- remove (one of) duplicate unique indexes from Region table
-ALTER TABLE `region` DROP INDEX `id_3`;
+ALTER TABLE `region` DROP INDEX IF EXISTS `id_3`;

Review comment:
       I ran this, it worked:
   ```
   > ALTER TABLE `region` DROP INDEX IF EXISTS `id_3`;
   Query OK, 0 rows affected, 1 warning (0.002 sec)
   Records: 0  Duplicates: 0  Warnings: 1
   
   ```




----------------------------------------------------------------
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:
users@infra.apache.org