Adding cover to tox.ini default envs
[osm/RO.git] / RO / osm_ro / database_utils / migrations / down / 35_remove_sfc_ingress_and_egress.sql
1 /**
2 * Licensed under the Apache License, Version 2.0 (the "License"); you may
3 * not use this file except in compliance with the License. You may obtain
4 * a copy of the License at
5 *
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 * License for the specific language governing permissions and limitations
12 * under the License.
13 **/
14 --
15 -- Removing ingress and egress ports for SFC purposes.
16 -- Inserting only one port for ingress and egress.
17 --
18
19 ALTER TABLE sce_rsp_hops
20 DROP FOREIGN KEY FK_interfaces_rsp_hop_ingress,
21 CHANGE COLUMN ingress_interface_id interface_id VARCHAR(36) NOT NULL
22 AFTER if_order,
23 ADD CONSTRAINT FK_interfaces_rsp_hop
24 FOREIGN KEY (interface_id)
25 REFERENCES interfaces (uuid) ON UPDATE CASCADE ON DELETE CASCADE,
26 DROP FOREIGN KEY FK_interfaces_rsp_hop_egress,
27 DROP COLUMN egress_interface_id;
28
29 DELETE FROM schema_version WHERE version_int='35';