mirror of https://github.com/apache/cloudstack.git
33 lines
1.5 KiB
SQL
33 lines
1.5 KiB
SQL
-- Licensed to the Apache Software Foundation (ASF) under one
|
|
-- or more contributor license agreements. See the NOTICE file
|
|
-- distributed with this work for additional information
|
|
-- regarding copyright ownership. The ASF licenses this file
|
|
-- to you under the Apache License, Version 2.0 (the
|
|
-- "License"); you may not use this file except in compliance
|
|
-- with the License. You may obtain a copy of the License at
|
|
--
|
|
-- http://www.apache.org/licenses/LICENSE-2.0
|
|
--
|
|
-- Unless required by applicable law or agreed to in writing,
|
|
-- software distributed under the License is distributed on an
|
|
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
-- KIND, either express or implied. See the License for the
|
|
-- specific language governing permissions and limitations
|
|
-- under the License.
|
|
|
|
--;
|
|
-- Schema upgrade from 4.6.1 to 4.7.0;
|
|
--;
|
|
|
|
CREATE TABLE IF NOT EXISTS `cloud`.`domain_vlan_map` (
|
|
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
|
|
`domain_id` bigint unsigned NOT NULL COMMENT 'domain id. foreign key to domain table',
|
|
`vlan_db_id` bigint unsigned NOT NULL COMMENT 'database id of vlan. foreign key to vlan table',
|
|
PRIMARY KEY (`id`),
|
|
CONSTRAINT `fk_domain_vlan_map__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`) ON DELETE CASCADE,
|
|
INDEX `i_account_vlan_map__domain_id`(`domain_id`),
|
|
CONSTRAINT `fk_domain_vlan_map__vlan_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan` (`id`) ON DELETE CASCADE,
|
|
INDEX `i_account_vlan_map__vlan_id`(`vlan_db_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|