Remove foreign key which is not supported by code 55/17355/1
authorRob Daugherty <rd472p@att.com>
Thu, 5 Oct 2017 15:13:00 +0000 (11:13 -0400)
committerRob Daugherty <rd472p@att.com>
Thu, 5 Oct 2017 15:23:44 +0000 (11:23 -0400)
The foreign key we fixed in the VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM
table is blocking distribution of the model.  The insert that's
failing is:

insert into VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM (
VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID,
VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID)
values (?, ?);

The error is: "foreign key constraint fails"

Issue: SO-180
Change-Id: I19cda2d4dae86e3257723f0fea6921049e391aca
Signed-off-by: Rob Daugherty <rd472p@att.com>
volumes/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/MySQL-Catalog-schema.sql

index 7503fa6..836b3f9 100644 (file)
         drop 
         foreign key FK_iff1ayhb1hrp5jhea3vvikuni;
 
-    alter table VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM 
-        drop 
-        foreign key FK_4p0consmgggrkf4qj1onx8g5j;
-
     drop table if exists ALLOTTED_RESOURCE;
 
     drop table if exists ALLOTTED_RESOURCE_CUSTOMIZATION;
         add constraint FK_iff1ayhb1hrp5jhea3vvikuni 
         foreign key (VNF_RESOURCE_MODEL_UUID) 
         references VNF_RESOURCE (MODEL_UUID);
-
-    alter table VNF_RES_CUSTOM_TO_VF_MODULE_CUSTOM 
-        add constraint FK_4p0consmgggrkf4qj1onx8g5j 
-        foreign key (VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID) 
-        references VNF_RESOURCE_CUSTOMIZATION (MODEL_CUSTOMIZATION_UUID);