mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Accounts can hold multiple vnets. Same vnets can exist across multiple pnets. It is sufficient to constrain a single vnet in a given pnet within a datacenter. i_op_dc_vnet_alloc__vnet__data_center_id covers all use cases for the table.
Having `i_op_dc_vnet_alloc__vnet__data_center_id__account_id` will restrict same account holding the same vnet across different physical networks. Signed-off-by: Kishan Kavala <kishan@cloud.com>
This commit is contained in:
parent
b683c34d3f
commit
5b8f0791ec
@ -251,6 +251,8 @@ ALTER TABLE `cloud`.`op_dc_vnet_alloc` DROP INDEX i_op_dc_vnet_alloc__vnet__data
|
||||
|
||||
ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD CONSTRAINT UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id`(`vnet`, `physical_network_id`, `data_center_id`);
|
||||
|
||||
ALTER TABLE `cloud`.`op_dc_vnet_alloc` DROP INDEX i_op_dc_vnet_alloc__vnet__data_center_id__account_id;
|
||||
|
||||
CREATE TABLE `cloud`.`region` (
|
||||
`id` int unsigned NOT NULL UNIQUE,
|
||||
`name` varchar(255) NOT NULL UNIQUE,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user