summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql5
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/schema.sql7
-rw-r--r--asdc-controller/src/test/resources/schema.sql7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql7
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql11
5 files changed, 19 insertions, 18 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql
new file mode 100644
index 0000000000..b1aefaf56c
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.24__UpdateHeatRelatedAttribute.sql
@@ -0,0 +1,5 @@
+use catalogdb;
+
+ALTER TABLE network_resource MODIFY COLUMN AIC_VERSION_MIN varchar(20) NULL;
+ALTER TABLE network_resource MODIFY COLUMN HEAT_TEMPLATE_ARTIFACT_UUID varchar(200) NULL;
+ALTER TABLE network_resource DROP FOREIGN KEY fk_network_resource__temp_network_heat_template_lookup__mod_nm1; \ No newline at end of file
diff --git a/adapters/mso-openstack-adapters/src/test/resources/schema.sql b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
index 58083abba1..f0dfc16bd0 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/schema.sql
+++ b/adapters/mso-openstack-adapters/src/test/resources/schema.sql
@@ -139,11 +139,11 @@ create table `network_resource` (
`model_name` varchar(200) not null,
`model_invariant_uuid` varchar(200) default null,
`description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) not null,
+ `heat_template_artifact_uuid` varchar(200) null,
`neutron_network_type` varchar(20) default null,
`model_version` varchar(20) default null,
`tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) not null,
+ `aic_version_min` varchar(20) null,
`aic_version_max` varchar(20) default null,
`orchestration_mode` varchar(20) default 'heat',
`resource_category` varchar(20) default null,
@@ -152,8 +152,7 @@ create table `network_resource` (
primary key (`model_uuid`),
key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
- constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
+ constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
) engine=innodb default charset=latin1;
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index 020155be65..9254780291 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -142,11 +142,11 @@ create table `network_resource` (
`model_name` varchar(200) not null,
`model_invariant_uuid` varchar(200) default null,
`description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) not null,
+ `heat_template_artifact_uuid` varchar(200) null,
`neutron_network_type` varchar(20) default null,
`model_version` varchar(20) default null,
`tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) not null,
+ `aic_version_min` varchar(20) null,
`aic_version_max` varchar(20) default null,
`orchestration_mode` varchar(20) default 'heat',
`resource_category` varchar(20) default null,
@@ -155,8 +155,7 @@ create table `network_resource` (
primary key (`model_uuid`),
key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
- constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
+ constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
) engine=innodb default charset=latin1;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
index fe81fbcf92..98b26a4be2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -141,11 +141,11 @@ create table `network_resource` (
`model_name` varchar(200) not null,
`model_invariant_uuid` varchar(200) default null,
`description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) not null,
+ `heat_template_artifact_uuid` varchar(200) null,
`neutron_network_type` varchar(20) default null,
`model_version` varchar(20) default null,
`tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) not null,
+ `aic_version_min` varchar(20) null,
`aic_version_max` varchar(20) default null,
`orchestration_mode` varchar(20) default 'heat',
`resource_category` varchar(20) default null,
@@ -154,8 +154,7 @@ create table `network_resource` (
primary key (`model_uuid`),
key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
- constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
+ constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
) engine=innodb default charset=latin1;
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index bd19c77e44..221f0d8df6 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -165,8 +165,8 @@ create table `network_recipe` (
create table `temp_network_heat_template_lookup` (
`network_resource_model_name` varchar(200) not null,
- `heat_template_artifact_uuid` varchar(200) not null,
- `aic_version_min` varchar(20) not null,
+ `heat_template_artifact_uuid` varchar(200) null,
+ `aic_version_min` varchar(20) null,
`aic_version_max` varchar(20) default null,
primary key (`network_resource_model_name`),
key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
@@ -180,11 +180,11 @@ create table `network_resource` (
`model_name` varchar(200) not null,
`model_invariant_uuid` varchar(200) default null,
`description` varchar(1200) default null,
- `heat_template_artifact_uuid` varchar(200) not null,
+ `heat_template_artifact_uuid` varchar(200) null,
`neutron_network_type` varchar(20) default null,
`model_version` varchar(20) default null,
`tosca_node_type` varchar(200) default null,
- `aic_version_min` varchar(20) not null,
+ `aic_version_min` varchar(20) null,
`aic_version_max` varchar(20) default null,
`orchestration_mode` varchar(20) default 'heat',
`resource_category` varchar(20) default null,
@@ -193,8 +193,7 @@ create table `network_resource` (
primary key (`model_uuid`),
key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
- constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
- constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
+ constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
) engine=innodb default charset=latin1;