From: tierno Date: Tue, 8 Jan 2019 16:22:40 +0000 (+0000) Subject: fixing database sql errors X-Git-Tag: v5.0.3~6 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F7088%2F1;p=osm%2FRO.git fixing database sql errors Change-Id: Ic73bf8a47378f4c55ece64014a279264f5bf0855 Signed-off-by: tierno --- diff --git a/database_utils/mano_db_structure.sql b/database_utils/mano_db_structure.sql index 747ffe27..9e2d911e 100644 --- a/database_utils/mano_db_structure.sql +++ b/database_utils/mano_db_structure.sql @@ -780,16 +780,19 @@ DROP TABLE IF EXISTS `sce_rsp_hops`; CREATE TABLE `sce_rsp_hops` ( `uuid` varchar(36) NOT NULL, `if_order` int(11) NOT NULL DEFAULT '0', - `interface_id` varchar(36) NOT NULL, + `ingress_interface_id` varchar(36) NOT NULL, + `egress_interface_id` varchar(36) NOT NULL, `sce_vnf_id` varchar(36) NOT NULL, `sce_rsp_id` varchar(36) NOT NULL, `created_at` double NOT NULL, `modified_at` double DEFAULT NULL, PRIMARY KEY (`uuid`), - KEY `FK_interfaces_rsp_hop` (`interface_id`), + KEY `FK_interfaces_rsp_hop` (`ingress_interface_id`), KEY `FK_sce_vnfs_rsp_hop` (`sce_vnf_id`), KEY `FK_sce_rsps_rsp_hop` (`sce_rsp_id`), - CONSTRAINT `FK_interfaces_rsp_hop` FOREIGN KEY (`interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, + KEY `FK_interfaces_rsp_hop_egress` (`egress_interface_id`), + CONSTRAINT `FK_interfaces_rsp_hop_egress` FOREIGN KEY (`egress_interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_interfaces_rsp_hop_ingress` FOREIGN KEY (`ingress_interface_id`) REFERENCES `interfaces` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_sce_rsps_rsp_hop` FOREIGN KEY (`sce_rsp_id`) REFERENCES `sce_rsps` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_sce_vnfs_rsp_hop` FOREIGN KEY (`sce_vnf_id`) REFERENCES `sce_vnfs` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -997,7 +1000,7 @@ CREATE TABLE `vms` ( `vnf_id` varchar(36) NOT NULL, `count` smallint(6) NOT NULL DEFAULT '1', `flavor_id` varchar(36) NOT NULL COMMENT 'Link to flavor table', - `image_id` varchar(36) NOT NULL COMMENT 'Link to image table', + `image_id` varchar(36) DEFAULT NULL COMMENT 'Link to image table', `image_list` text COMMENT 'Alternative images', `image_path` varchar(100) DEFAULT NULL COMMENT 'Path where the image of the VM is located', `boot_data` text, @@ -1059,7 +1062,7 @@ CREATE TABLE `wim_accounts` ( `created` enum('true','false') NOT NULL DEFAULT 'false', `user` varchar(64) DEFAULT NULL, `password` varchar(64) DEFAULT NULL, - `config` varchar(4000) DEFAULT NULL, + `config` text, `created_at` double NOT NULL, `modified_at` double DEFAULT NULL, PRIMARY KEY (`uuid`), @@ -1134,7 +1137,7 @@ CREATE TABLE `wims` ( `description` varchar(255) DEFAULT NULL, `type` varchar(36) NOT NULL DEFAULT 'odl', `wim_url` varchar(150) NOT NULL, - `config` varchar(4000) DEFAULT NULL, + `config` text, `created_at` double NOT NULL, `modified_at` double DEFAULT NULL, PRIMARY KEY (`uuid`), diff --git a/openmanod b/openmanod index ba60e25c..a4af12f3 100755 --- a/openmanod +++ b/openmanod @@ -50,8 +50,8 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.6.03" -version_date = "Dec 2018" +__version__ = "0.6.04" +version_date = "Jan 2019" database_version = 36 # expected database schema version global global_config