diff options
author | zm330 <zhangminyj@chinamobile.com> | 2020-03-24 11:16:56 +0800 |
---|---|---|
committer | zm330 <zhangminyj@chinamobile.com> | 2020-03-24 11:19:40 +0800 |
commit | 3b6caf9cc8e1341ea000cb55ae277f622c816dda (patch) | |
tree | 7c8c2335b2ba658487fd454c8dde99650a5d8668 /adapters/mso-catalog-db-adapter/src/main/resources | |
parent | 745c624081e15d018e221272c5be661d42bff8eb (diff) |
Update Asdc DB table
Issue-ID: SO-2758
Signed-off-by: zm330 <zhangminyj@chinamobile.com>
Change-Id: Ic916e55effe0e3688b8d014fb70ea0e2ad23c16a
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.5__AddServiceArtifact.sql | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.5__AddServiceArtifact.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.5__AddServiceArtifact.sql index d32c4666c5..6ef8446a9f 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.5__AddServiceArtifact.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V7.5__AddServiceArtifact.sql @@ -4,7 +4,9 @@ CREATE TABLE IF NOT EXISTS `service_info` ( `ID` int (11) AUTO_INCREMENT, `SERVICE_INPUT` varchar (5000), `SERVICE_PROPERTIES` varchar (5000), - PRIMARY KEY (`ID`) + `SERVICE_MODEL_UUID` varchar (200) NOT NULL, + PRIMARY KEY (`ID`), + CONSTRAINT `fk_service_info_service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE )ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `service_artifact`( @@ -18,13 +20,5 @@ CREATE TABLE IF NOT EXISTS `service_artifact`( `CREATION_TIMESTAMP` DATETIME DEFAULT CURRENT_TIMESTAMP, `SERVICE_MODEL_UUID` varchar (200) NOT NULL, PRIMARY KEY (`ARTIFACT_UUID`), - CONSTRAINT `fk_service_artifact_service_info1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `fk_service_artifact_service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE )ENGINE=InnoDB DEFAULT CHARSET=latin1; - -CREATE TABLE IF NOT EXISTS `service_to_service_info` ( - `SERVICE_MODEL_UUID` varchar (200) NOT NULL, - `SERVICE_INFO_ID` INT (11) NOT NULL, - PRIMARY KEY (`SERVICE_MODEL_UUID`,`SERVICE_INFO_ID`), - CONSTRAINT `fk_service_to_service_info__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) REFERENCES `service` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `fk_service_to_service_info__service_info1` FOREIGN KEY (`SERVICE_INFO_ID`) REFERENCES `service_info` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE -)
\ No newline at end of file |