diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index 6c59208386a..499975517bb 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -508,7 +508,10 @@ CREATE TABLE `cloud`.`op_dc_link_local_ip_address_alloc` ( `nic_id` bigint unsigned NULL COMMENT 'instance id', `reservation_id` char(40) NULL COMMENT 'reservation id used to reserve this network', `taken` datetime COMMENT 'Date taken', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + INDEX `i_op_dc_link_local_ip_address_alloc__pod_id`(`pod_id`), + INDEX `i_op_dc_link_local_ip_address_alloc__data_center_id`(`data_center_id`), + INDEX `i_op_dc_link_local_ip_address_alloc__nic_id_reservation_id`(`nic_id`,`reservation_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`host_pod_ref` ( diff --git a/setup/db/db/schema-224to225.sql b/setup/db/db/schema-224to225.sql index f48ab82f908..0dae397975d 100644 --- a/setup/db/db/schema-224to225.sql +++ b/setup/db/db/schema-224to225.sql @@ -46,4 +46,8 @@ ALTER TABLE `cloud`.`security_ingress_rule` DROP COLUMN `allowed_sec_grp_acct`; ALTER TABLE `cloud`.`data_center` ADD COLUMN `zone_token` varchar(255); ALTER TABLE `cloud`.`data_center` ADD INDEX `i_data_center__zone_token`(`zone_token`); -ALTER TABLE `cloud`.`vm_template` ADD COLUMN `source_template_id` bigint unsigned COMMENT 'Id of the original template, if this template is created from snapshot'; +ALTER TABLE `cloud`.`vm_template` ADD COLUMN `source_template_id` bigint unsigned COMMENT 'Id of the original template, if this template is created from snapshot'; + +ALTER TABLE `cloud`.`op_dc_link_local_ip_address_alloc` ADD INDEX `i_op_dc_link_local_ip_address_alloc__pod_id`(`pod_id`); +ALTER TABLE `cloud`.`op_dc_link_local_ip_address_alloc` ADD INDEX `i_op_dc_link_local_ip_address_alloc__data_center_id`(`data_center_id`); +ALTER TABLE `cloud`.`op_dc_link_local_ip_address_alloc` ADD INDEX `i_op_dc_link_local_ip_address_alloc__nic_id_reservation_id`(`nic_id`,`reservation_id`); \ No newline at end of file