weizhouapache commented on code in PR #9752:
URL: https://github.com/apache/cloudstack/pull/9752#discussion_r2016695948
##########
engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql:
##########
@@ -37,3 +37,50 @@ WHERE rp.rule = 'quotaStatement'
AND NOT EXISTS(SELECT 1 FROM cloud.role_permissions rp_ WHERE rp.role_id =
rp_.role_id AND rp_.rule = 'quotaCreditsList');
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.host', 'last_mgmt_server_id',
'bigint unsigned DEFAULT NULL COMMENT "last management server this host is
connected to" AFTER `mgmt_server_id`');
+
+UPDATE `cloud`.`configuration` SET value = CONCAT(value, ',External') WHERE
name = 'hypervisor.list';
+
+CREATE TABLE IF NOT EXISTS `cloud`.`extension` (
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `uuid` varchar(40) NOT NULL UNIQUE,
+ `name` varchar(255) NOT NULL,
+ `type` varchar(255) NOT NULL,
+ `created` datetime NOT NULL,
+ `removed` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`extension_details` (
+ `id` bigint unsigned UNIQUE NOT NULL AUTO_INCREMENT COMMENT 'id',
+ `extension_id` bigint unsigned NOT NULL COMMENT 'extension to which the
detail is related to',
+ `name` varchar(255) NOT NULL COMMENT 'name of the detail',
+ `value` varchar(255) NOT NULL COMMENT 'value of the detail',
+ `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be
displayed to the end user',
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_extension_details__extension_id` FOREIGN KEY (`extension_id`)
+ REFERENCES `extension` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `cloud`.`extension_resource_map` (
+ `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ `extension_id` bigint(20) unsigned NOT NULL,
+ `resource_id` bigint(20) unsigned NOT NULL,
+ `resource_type` varchar(255) NOT NULL,
+ `created` datetime NOT NULL,
+ `removed` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_extension_resource_map__extension_id` FOREIGN KEY
(`extension_id`)
+ REFERENCES `cloud`.`extension`(`id`) ON DELETE CASCADE,
+ INDEX `idx_extension_resource` (`resource_id`, `resource_type`),
Review Comment:
```suggestion
INDEX `idx_extension_resource` (`resource_id`, `resource_type`)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]