added 2.2.2 to 2.2.4

This commit is contained in:
Alex Huang 2011-03-18 10:41:58 -07:00
parent 093fa851fa
commit 8723727de1
3 changed files with 11 additions and 12 deletions

View File

@ -1072,14 +1072,12 @@ public class Upgrade217to22 implements DbUpgrade {
@Override
public File[] getCleanupScripts() {
return null;
String file = Script.findScript("", "db/schema-21to22-cleanup.sql");
if (file == null) {
throw new CloudRuntimeException("Unable to find the upgrade script, schema-21to22-cleanup.sql");
}
// String file = Script.findScript("", "db/schema-21to22-cleanup.sql");
// if (file == null) {
// throw new CloudRuntimeException("Unable to find the upgrade script, schema-21to22-cleanup.sql");
// }
//
// return new File[] { new File(file) };
return new File[] { new File(file) };
}
@Override
@ -1089,7 +1087,7 @@ public class Upgrade217to22 implements DbUpgrade {
@Override
public String getUpgradedVersion() {
return "2.2.0";
return "2.2.1";
}
@Override

View File

@ -548,4 +548,4 @@ CREATE TABLE `cloud`.`storage_pool_work` (
-- Insert stuff?;
INSERT INTO `cloud`.`sequence` (name, value) VALUES ('volume_seq', (SELECT max(id) + 1 or 200 from volumes));
INSERT INTO `cloud`.`sequence` (name, value) VALUES ('networks_seq', 200);
INSERT INTO `cloud`.`sequence` (name, value) VALUES ('networks_seq', 200);

View File

@ -5,7 +5,8 @@ ALTER table snapshots add column `size` bigint unsigned NOT NULL;
ALTER table snapshots add column `version` varchar(32) DEFAULT '2.1';
ALTER table snapshots add column `hypervisor_type` varchar(32) DEFAULT 'XenServer';
UPDATE snapshots s, volumes v SET s.data_center_id=v.data_center_id, s.domain_id=v.domain_id, s.disk_offering_id=v.disk_offering_id, s.size=v.size WHERE s.volume_id = v.id
UPDATE snapshots s, snapshot_policy sp, snapshot_policy_ref spr SET s.type=snapshot_type=sp.interval+3. WHERE s.id=spr.snap_id and spr.policy_id=sr.id
UPDATE snapshots s, volumes v SET s.data_center_id=v.data_center_id, s.domain_id=v.domain_id, s.disk_offering_id=v.disk_offering_id, s.size=v.size WHERE s.volume_id = v.id;
UPDATE snapshots s, snapshot_policy sp, snapshot_policy_ref spr SET s.hypervisor_type=sp.interval+3 WHERE s.id=spr.snap_id and spr.policy_id=sp.id;
DROP table snapshot_policy_ref
DROP table snapshot_policy_ref;
DELETE FROM snapshot_policy WHERE id=1;