diff --git a/server/src/com/cloud/upgrade/dao/Upgrade218to22.java b/server/src/com/cloud/upgrade/dao/Upgrade218to22.java index 5d5058c5d28..49c976c1438 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade218to22.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade218to22.java @@ -1459,6 +1459,7 @@ public class Upgrade218to22 implements DbUpgrade { zoneId = Long.parseLong(volEventParams.getProperty("dcId")); templateId = Long.parseLong(volEventParams.getProperty("tId")); size = Long.parseLong(volEventParams.getProperty("size")); + size = (size * 1048576); if(doId == -1){ doId = null; } diff --git a/setup/db/db/schema-21to22.sql b/setup/db/db/schema-21to22.sql index 10b28ca20d3..0f39e6cf40d 100755 --- a/setup/db/db/schema-21to22.sql +++ b/setup/db/db/schema-21to22.sql @@ -373,8 +373,10 @@ update `cloud`.`disk_offering` set name='System Offering For Software Router' wh update `cloud`.`disk_offering` set name='System Offering For Secondary Storage VM' where name='Fake Offering For Secondary Storage VM' and system_use=1; ALTER TABLE `cloud`.`user_statistics` ADD COLUMN `public_ip_address` varchar(15) DEFAULT NULL; -ALTER TABLE `cloud`.`user_statistics` ADD COLUMN `device_id` bigint unsigned NOT NULL; -ALTER TABLE `cloud`.`user_statistics` ADD COLUMN `device_type` varchar(32) NOT NULL; +ALTER TABLE `cloud`.`user_statistics` ADD COLUMN `device_id` bigint unsigned NOT NULL default 0; +ALTER TABLE `cloud`.`user_statistics` ADD COLUMN `device_type` varchar(32) NOT NULL default 'DomainRouter'; + +INSERT INTO user_statistics ( account_id, data_center_id, device_id, device_type ) SELECT VM.account_id, VM.data_center_id, DR.id,'DomainRouter' FROM vm_instance VM, domain_router DR WHERE VM.id = DR.id; CREATE TABLE `cloud`.`remote_access_vpn` ( `vpn_server_addr_id` bigint unsigned UNIQUE NOT NULL,