From 24b4007149540cc47be293192d6ef35dce010674 Mon Sep 17 00:00:00 2001 From: Likitha Shetty Date: Wed, 21 Mar 2012 10:42:51 +0530 Subject: [PATCH] Bug 13842 Mark the snapshots that belong to a removed secondary storage as removed. Reviewed-By: Nitin Status 13842: resolved fixed --- setup/db/db/schema-30to301.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/db/db/schema-30to301.sql b/setup/db/db/schema-30to301.sql index 81de759a832..75679b643d0 100755 --- a/setup/db/db/schema-30to301.sql +++ b/setup/db/db/schema-30to301.sql @@ -19,4 +19,6 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Project Defaults', 'DEFAULT', 'management-server', 'max.project.networks', '20', 'The default maximum number of networks that can be created for a project'); -INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Account Defaults', 'DEFAULT', 'management-server', 'max.account.networks', '20', 'The default maximum number of networks that can be created for an account'); \ No newline at end of file +INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Account Defaults', 'DEFAULT', 'management-server', 'max.account.networks', '20', 'The default maximum number of networks that can be created for an account'); + +UPDATE snapshots SET removed=now() WHERE removed IS NULL AND sechost_id IN (SELECT id FROM host WHERE type='SecondaryStorage' AND removed IS NOT NULL);