cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amogh Vasekar <amogh.vase...@citrix.com>
Subject Re: Just checked in a minor change to the DB
Date Thu, 13 Mar 2014 00:17:36 GMT
Hi All,

(Since I am not sure yet if a tag has been agreed to, sending on this
thread instead)
I made a couple of changes to guest_os and guest_os_hypervisor tables, the
following should take care of schema changes after git pull:

===guest_os_hypervisor====
ALTER TABLE `cloud`.`guest_os_hypervisor` ADD COLUMN `hypervisor_version`
varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Hypervisor version for
this mapping';
ALTER TABLE `cloud`.`guest_os_hypervisor` ADD COLUMN `uuid` varchar(40)
COMMENT 'UUID of the mapping';
ALTER TABLE `cloud`.`guest_os_hypervisor` ADD CONSTRAINT
`uc_guest_os_hypervisor__uuid` UNIQUE (`uuid`);
ALTER TABLE `cloud`.`guest_os_hypervisor` ADD COLUMN `created` datetime
COMMENT 'Time when mapping was created';
ALTER TABLE `cloud`.`guest_os_hypervisor` ADD COLUMN `removed` datetime
COMMENT 'Time when mapping was removed if deleted, else NULL';
UPDATE `cloud`.`guest_os_hypervisor` SET `uuid` = UUID();
UPDATE `cloud`.`guest_os_hypervisor` SET `created` = now();
==========================

===guest_os====

ALTER TABLE `cloud`.`guest_os` ADD COLUMN `created` datetime COMMENT 'Time
when Guest OS was created in system';
ALTER TABLE `cloud`.`guest_os` ADD COLUMN `removed` datetime COMMENT 'Time
when Guest OS was removed if deleted, else NULL';
UPDATE `cloud`.`guest_os` SET `created` = now();
===============


Thanks,
Amogh

On 3/6/14 12:05 PM, "Mike Tutkowski" <mike.tutkowski@solidfire.com> wrote:

>Hi everyone,
>
>Just wanted to give you a heads up that I made a minor change to two views
>in the DB in 9b66866dc2085486f465159cbd446ac03e266a2c:
>
>service_offering_view and disk_offering_view
>
>I added some columns to these views so I could present additional info in
>the GUI.
>
>If you want to bring these two views up to date, just run the following
>SQL:
>
>DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
>CREATE VIEW `cloud`.`disk_offering_view` AS
>    select
>        disk_offering.id,
>        disk_offering.uuid,
>        disk_offering.name,
>        disk_offering.display_text,
>        disk_offering.disk_size,
>        disk_offering.min_iops,
>        disk_offering.max_iops,
>        disk_offering.created,
>        disk_offering.tags,
>        disk_offering.customized,
>        disk_offering.customized_iops,
>        disk_offering.removed,
>        disk_offering.use_local_storage,
>        disk_offering.system_use,
>        disk_offering.hv_ss_reserve,
>        disk_offering.bytes_read_rate,
>        disk_offering.bytes_write_rate,
>        disk_offering.iops_read_rate,
>        disk_offering.iops_write_rate,
>        disk_offering.cache_mode,
>        disk_offering.sort_key,
>        disk_offering.type,
>        disk_offering.display_offering,
>        domain.id domain_id,
>        domain.uuid domain_uuid,
>        domain.name domain_name,
>        domain.path domain_path
>    from
>        `cloud`.`disk_offering`
>            left join
>        `cloud`.`domain` ON disk_offering.domain_id = domain.id
>    where
>        disk_offering.state='ACTIVE';
>
>DROP VIEW IF EXISTS `cloud`.`service_offering_view`;
>CREATE VIEW `cloud`.`service_offering_view` AS
>    select
>        service_offering.id,
>        disk_offering.uuid,
>        disk_offering.name,
>        disk_offering.display_text,
>        disk_offering.created,
>        disk_offering.tags,
>        disk_offering.removed,
>        disk_offering.use_local_storage,
>        disk_offering.system_use,
>        disk_offering.customized_iops,
>        disk_offering.min_iops,
>        disk_offering.max_iops,
>        disk_offering.hv_ss_reserve,
>        disk_offering.bytes_read_rate,
>        disk_offering.bytes_write_rate,
>        disk_offering.iops_read_rate,
>        disk_offering.iops_write_rate,
>        disk_offering.cache_mode,
>        service_offering.cpu,
>        service_offering.speed,
>        service_offering.ram_size,
>        service_offering.nw_rate,
>        service_offering.mc_rate,
>        service_offering.ha_enabled,
>        service_offering.limit_cpu_use,
>        service_offering.host_tag,
>        service_offering.default_use,
>        service_offering.vm_type,
>        service_offering.sort_key,
>        service_offering.is_volatile,
>        service_offering.deployment_planner,
>        domain.id domain_id,
>        domain.uuid domain_uuid,
>        domain.name domain_name,
>        domain.path domain_path
>    from
>        `cloud`.`service_offering`
>            inner join
>        `cloud`.`disk_offering` ON service_offering.id = disk_offering.id
>            left join
>        `cloud`.`domain` ON disk_offering.domain_id = domain.id
>    where
>        disk_offering.state='Active';
>
>Thanks!
>
>-- 
>*Mike Tutkowski*
>*Senior CloudStack Developer, SolidFire Inc.*
>e: mike.tutkowski@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the
>cloud<http://solidfire.com/solution/overview/?video=play>
>*(tm)*


Mime
View raw message