From 28da2ffb0e97c9014e7fca7e4ea967aa4cb23bec Mon Sep 17 00:00:00 2001 From: Alex Huang Date: Fri, 1 Apr 2011 09:33:37 -0700 Subject: [PATCH] bug 9259: why should destroyed be NULL to begin with. fix upgrade --- setup/db/db/schema-21to22.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/db/db/schema-21to22.sql b/setup/db/db/schema-21to22.sql index b9e6bdd1680..3539871c1b4 100755 --- a/setup/db/db/schema-21to22.sql +++ b/setup/db/db/schema-21to22.sql @@ -261,7 +261,7 @@ 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='Destroyed' 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 AND status='Created'; +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; ALTER TABLE `cloud`.`vlan` ADD COLUMN `network_id` bigint unsigned NOT NULL;