diff options
Diffstat (limited to 'installation')
-rw-r--r-- | installation/sdnc/src/main/resources/network_model.data.dump | 2 | ||||
-rw-r--r-- | installation/sdnc/src/main/scripts/installSdncDb.sh | 3 | ||||
-rw-r--r-- | installation/sdnc/src/main/scripts/rmForeignKey.sh | 18 |
3 files changed, 22 insertions, 1 deletions
diff --git a/installation/sdnc/src/main/resources/network_model.data.dump b/installation/sdnc/src/main/resources/network_model.data.dump index 9d9cb1f6..f0c256fb 100644 --- a/installation/sdnc/src/main/resources/network_model.data.dump +++ b/installation/sdnc/src/main/resources/network_model.data.dump @@ -53,7 +53,7 @@ CREATE TABLE `NETWORK_MODEL` ( `version` varchar(255) DEFAULT NULL, PRIMARY KEY (`customization_uuid`), KEY `FK_NETWORK_MODEL` (`service_uuid`), - CONSTRAINT `FK_NETWORK_MODEL` FOREIGN KEY (`service_uuid`) REFERENCES `service_model` (`service_uuid`) ON DELETE NO ACTION ON UPDATE NO ACTION + CONSTRAINT `FK_NETWORK_MODEL` FOREIGN KEY (`service_uuid`) REFERENCES `SERVICE_MODEL` (`service_uuid`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/installation/sdnc/src/main/scripts/installSdncDb.sh b/installation/sdnc/src/main/scripts/installSdncDb.sh index 7f05d723..e726f5f8 100644 --- a/installation/sdnc/src/main/scripts/installSdncDb.sh +++ b/installation/sdnc/src/main/scripts/installSdncDb.sh @@ -52,3 +52,6 @@ done # Create VNIs 100-199 ${SDNC_HOME}/bin/addVnis.sh 100 199 + +# Drop FK_NETWORK_MODEL foreign key as workaround for SDNC-291. +${SDNC_HOME}/bin/rmForeignKey.sh NETWORK_MODEL FK_NETWORK_MODEL diff --git a/installation/sdnc/src/main/scripts/rmForeignKey.sh b/installation/sdnc/src/main/scripts/rmForeignKey.sh new file mode 100644 index 00000000..40914fa2 --- /dev/null +++ b/installation/sdnc/src/main/scripts/rmForeignKey.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +MYSQL_USER=${MYSQL_USER:-sdnctl} +MYSQL_PWD=${MYSQL_PWD:-gamma} +MYSQL_DB=${MYSQL_DB:-sdnctl} +MYSQL_HOST=${MYSQL_HOST:-dbhost} + + +if [ $# -ne 2 ] +then + echo "Usage: $0 table foreign-key" + exit 1 +fi + +mysql --user=${MYSQL_USER} --password=${MYSQL_PWD} --host ${MYSQL_HOST} ${MYSQL_DB} <<EOF +ALTER TABLE $1 +DROP FOREIGN KEY $2; +EOF |