mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-8696: Create Region fails with exception
'id' in the region table should not be an autoincrement unlike other tables. This is because, region ids must be in sync across installs and hence is accepted as input to the addRegions api. It is not a good practise to override id for this purpose. another column 'regionId' has to be created and used(CLOUDSTACK-8706). until it is fixed, id should never be autoincrement in regions table.
This commit is contained in:
parent
c1ac5f3abc
commit
b6a78044a0
@ -398,3 +398,7 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` (
|
||||
CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
SET foreign_key_checks = 0;
|
||||
ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned UNIQUE NOT NULL;
|
||||
SET foreign_key_checks = 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user