mirror of https://github.com/apache/cloudstack.git
bug 11938: Removed unique constraint on usage_network_offering table.
status 11938: resolved fixed reviewed-by: Abhi
This commit is contained in:
parent
884b9f3a35
commit
4a80506448
|
|
@ -92,5 +92,14 @@ public class Upgrade2212to2213 implements DbUpgrade {
|
|||
// drop primary keys
|
||||
DbUpgradeUtils.dropPrimaryKeyIfExists(conn, "cloud_usage.usage_load_balancer_policy");
|
||||
DbUpgradeUtils.dropPrimaryKeyIfExists(conn, "cloud_usage.usage_port_forwarding");
|
||||
|
||||
//Drop usage_network_offering unique key
|
||||
try {
|
||||
PreparedStatement pstmt = conn.prepareStatement("drop index network_offering_id on cloud_usage.usage_network_offering");
|
||||
pstmt.executeUpdate();
|
||||
s_logger.debug("Dropped usage_network_offering unique key");
|
||||
} catch (Exception e) {
|
||||
// Ignore error if the usage_network_offering table or the unique key doesn't exist
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -249,8 +249,7 @@ CREATE TABLE `cloud_usage`.`usage_network_offering` (
|
|||
`network_offering_id` bigint unsigned NOT NULL,
|
||||
`is_default` smallint(1) NOT NULL,
|
||||
`created` DATETIME NOT NULL,
|
||||
`deleted` DATETIME NULL,
|
||||
UNIQUE KEY (`network_offering_id`, `vm_instance_id`, `created`)
|
||||
`deleted` DATETIME NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `cloud_usage`.`usage_network_offering` ADD INDEX `i_usage_network_offering__account_id`(`account_id`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue