mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
DB migration script for 2.1.7 to 2.2.1 - Changes needed for creating new host_tags table
This commit is contained in:
parent
dd282f01e1
commit
cf68ad7bc6
@ -517,6 +517,16 @@ CREATE TABLE `cloud`.`storage_pool_work` (
|
||||
UNIQUE (pool_id,vm_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `cloud`.`host_tags` (
|
||||
`id` bigint unsigned NOT NULL auto_increment,
|
||||
`host_id` bigint unsigned NOT NULL COMMENT 'host id',
|
||||
`tag` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `cloud`.`host_tags` ADD CONSTRAINT `fk_host_tags__host_id` FOREIGN KEY `fk_host_tags__host_id`(`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `cloud`.`service_offering` ADD COLUMN `host_tag` varchar(255);
|
||||
|
||||
-- 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user