Add cluster details to prepare supporting Xen host/cluster mode in vmware

This commit is contained in:
Kelven Yang 2011-01-04 02:41:39 -08:00
parent 647a357cdb
commit ce517a890f
2 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,7 @@ ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__data_center_id` FOREIG
ALTER TABLE `cloud`.`cluster` ADD CONSTRAINT `fk_cluster__pod_id` FOREIGN KEY `fd_cluster__pod_id`(`pod_id`) REFERENCES `cloud`.`host_pod_ref`(`id`);
ALTER TABLE `cloud`.`cluster` ADD UNIQUE `i_cluster__pod_id__name`(`pod_id`, `name`);
ALTER TABLE `cloud`.`cluster_details` ADD CONSTRAINT `fk_cluster_details__cluster_id` FOREIGN KEY `fk_cluster_details__cluster_id`(`cluster_id`) REFERENCES `cluster`(`id`) ON DELETE CASCADE;
ALTER TABLE `cloud`.`vm_template` ADD INDEX `i_vm_template__removed`(`removed`);
ALTER TABLE `cloud`.`vm_template` ADD INDEX `i_vm_template__public`(`public`);

View File

@ -234,6 +234,14 @@ CREATE TABLE `cloud`.`cluster` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`cluster_details` (
`id` bigint unsigned NOT NULL auto_increment,
`cluster_id` bigint unsigned NOT NULL COMMENT 'cluster id',
`name` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`ext_lun_alloc` (
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT COMMENT 'id',
`size` bigint unsigned NOT NULL COMMENT 'virtual size',