X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=RO%2Fosm_ro%2Fdatabase_utils%2Fmigrations%2Fdown%2F35_remove_sfc_ingress_and_egress.sql;fp=RO%2Fosm_ro%2Fdatabase_utils%2Fmigrations%2Fdown%2F35_remove_sfc_ingress_and_egress.sql;h=01f38f4d7da4df74dd35199769d323d29b604422;hb=7d782eff123e5b44d41437377ccca66ad1e8b21b;hp=0000000000000000000000000000000000000000;hpb=5db670b68349fd1f00a5efc8c0ccd0ef9d073dca;p=osm%2FRO.git diff --git a/RO/osm_ro/database_utils/migrations/down/35_remove_sfc_ingress_and_egress.sql b/RO/osm_ro/database_utils/migrations/down/35_remove_sfc_ingress_and_egress.sql new file mode 100644 index 00000000..01f38f4d --- /dev/null +++ b/RO/osm_ro/database_utils/migrations/down/35_remove_sfc_ingress_and_egress.sql @@ -0,0 +1,16 @@ +-- +-- Removing ingress and egress ports for SFC purposes. +-- Inserting only one port for ingress and egress. +-- + +ALTER TABLE sce_rsp_hops + DROP FOREIGN KEY FK_interfaces_rsp_hop_ingress, + CHANGE COLUMN ingress_interface_id interface_id VARCHAR(36) NOT NULL + AFTER if_order, + ADD CONSTRAINT FK_interfaces_rsp_hop + FOREIGN KEY (interface_id) + REFERENCES interfaces (uuid) ON UPDATE CASCADE ON DELETE CASCADE, + DROP FOREIGN KEY FK_interfaces_rsp_hop_egress, + DROP COLUMN egress_interface_id; + +DELETE FROM schema_version WHERE version_int='35';