summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources/schema.sql
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-11 21:14:32 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-11 21:14:46 -0500
commita85dc14805068ac6ab6eab7efd5d10459ee3ebc2 (patch)
tree534d0ff4078ec82b21e4fe21c639722ebf4ac1a0 /asdc-controller/src/test/resources/schema.sql
parentde5958dddd97b086ec8b603974f434fd814386ac (diff)
Service Proxy Consolidation
- Updated ServiceProxyResourceCustomization to remove the ID column - Removed setConfigurationResourceCustomization from serviceProxyResource since that relationship doesn't exist anymore - Updated ServiceProxy resource to remove the object dependencies between ServiceProxyCustomization and ConfigurationResourceCustomization - Removed the delete statement since this is causing the test to fail because the service table doesn't exist yet - Updated configuration_customization to drop the serviceProxyCustomization FK - Added migration script to consolidate the ServiceProxy and ServiceProxyCustomization into a single table and migrate the data. - Code changes to support consolidating the ServiceProxy and ServiceProxyCustomization table into a single table Change-Id: I1e49cb22c8b667f157dd1c349b5e36fd06236630 Issue-ID: SO-1380 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'asdc-controller/src/test/resources/schema.sql')
-rw-r--r--asdc-controller/src/test/resources/schema.sql63
1 files changed, 25 insertions, 38 deletions
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index a84b02db63..b17fb5d47c 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -517,36 +517,29 @@ default character set = latin1;
engine = innodb auto_increment = 20654
default character set = latin1;
- create table if not exists `service_proxy` (
- `model_uuid` varchar(200) not null,
- `model_invariant_uuid` varchar(200) not null,
- `model_version` varchar(20) not null,
- `model_name` varchar(200) not null,
- `description` varchar(1200) null,
- `creation_timestamp` datetime not null default current_timestamp,
- primary key (`model_uuid`))
- engine = innodb auto_increment = 20654
- default character set = latin1;
-
-create table if not exists `service_proxy_customization` (
-`model_customization_uuid` varchar(200) not null,
-`model_instance_name` varchar(200) not null,
-`tosca_node_type` varchar(200) not null,
-`source_service_model_uuid` varchar(200) not null,
-`creation_timestamp` datetime not null default current_timestamp,
-`service_proxy_model_uuid` varchar(200) not null,
-primary key (`model_customization_uuid`),
-index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
-index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
-constraint`fk_spr_customization__service_proxy_resource1`
-foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
-on delete cascade on update cascade,
-constraint `fk_service_proxy_resource_customization__service1`
-foreign key (`source_service_model_uuid`) references `service`
-(`model_uuid`) on delete cascade on update cascade)
-engine = innodb
-auto_increment = 20654
-default character set = latin1;
+CREATE TABLE IF NOT EXISTS `service_proxy_customization` (
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `MODEL_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_VERSION` VARCHAR(20) NOT NULL,
+ `MODEL_NAME` VARCHAR(200) NOT NULL,
+ `TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `SOURCE_SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
+ INDEX `fk_service_proxy_customization__service1_idx` (`SOURCE_SERVICE_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_service_proxy_customization` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_service_proxy_customization__serv_prox_to_serv` (`MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_service_proxy_resource_customization__service1`
+ FOREIGN KEY (`SOURCE_SERVICE_MODEL_UUID`)
+ REFERENCES `service` (`MODEL_UUID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
create table if not exists `configuration_customization` (
`model_customization_uuid` varchar(200) not null,
@@ -560,19 +553,13 @@ create table if not exists `configuration_customization` (
`configuration_customization_model_customization_uuid` varchar(200) null,
primary key (`model_customization_uuid`),
index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
-index `fk_configuration_customization__service_proxy_customization_idx`
-(`service_proxy_customization_model_customization_uuid` asc),
index `fk_configuration_customization__configuration_customization_idx`
(`configuration_customization_model_customization_uuid` asc),
constraint `fk_configuration_resource_customization__configuration_resour1`
foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
on delete cascade on update cascade,
-constraint `fk_configuration_customization__service_proxy_customization1` foreign
-key (`service_proxy_customization_model_customization_uuid`) references
-`service_proxy_customization` (`model_customization_uuid`)
-on delete cascade on update cascade, constraint
-`fk_configuration_customization__configuration_customization1` foreign
-key (`configuration_customization_model_customization_uuid`) references
+constraint `fk_configuration_customization__configuration_customization1`
+foreign key (`configuration_customization_model_customization_uuid`) references
`configuration_customization` (`model_customization_uuid`)
on delete cascade on update cascade)
engine = innodb