mirror of https://github.com/apache/cloudstack.git
bug 9473: mark all volumes with Destroyed>=1 with state=Destroy
status 9473: resolved fixed
This commit is contained in:
parent
a2dc7ec59e
commit
abe460c276
|
|
@ -270,7 +270,7 @@ ALTER TABLE `cloud`.`volumes` ADD COLUMN `chain_info` text;
|
|||
ALTER TABLE `cloud`.`volumes` MODIFY COLUMN `volume_type` VARCHAR(64) NOT NULL;
|
||||
|
||||
ALTER TABLE `cloud`.`volumes` ADD COLUMN `state` VARCHAR(32);
|
||||
UPDATE `cloud`.`volumes` SET state='Destroy' WHERE removed IS NOT NULL OR destroyed=1 OR status='Creating' OR status='Corrupted' OR status='Failed';
|
||||
UPDATE `cloud`.`volumes` SET state='Destroy' WHERE removed IS NOT NULL OR destroyed>=1 OR status='Creating' OR status='Corrupted' OR status='Failed';
|
||||
UPDATE `cloud`.`volumes` SET state='Ready' WHERE removed IS NULL AND (destroyed=0 OR destroyed is NULL) AND status='Created';
|
||||
ALTER TABLE `cloud`.`volumes` MODIFY COLUMN `state` VARCHAR(32) NOT NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue