diff options
author | 2018-08-13 09:48:57 -0400 | |
---|---|---|
committer | 2018-08-13 09:51:54 -0400 | |
commit | a81aef2172c2cb4c6735f6018aee7deb04140b5d (patch) | |
tree | 2ef9daca8d8a075142d1f900bb8862c6ce322491 /adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql | |
parent | c703669697084b5bd9be0f8f016bbf8ed11213a4 (diff) |
Cloud config database table support
added cloud config database entities
added cloud config repository
converted existing cloud config class
converted all code interacting with previous cloud config object
created migration to automatically load cloud config properties from
application.yaml
Issue-ID: SO-854
Change-Id: Icf408e5d0fcabd1b7e97298963c555fae6964930
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql new file mode 100644 index 0000000000..0042888117 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.0__AddModelAndModelRecipe.sql @@ -0,0 +1,31 @@ +USE catalogdb; + +create table if not exists model_recipe ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_ID` INT(11), + `ACTION` VARCHAR(40), + `SCHEMA_VERSION` VARCHAR(40), + `DESCRIPTION` VARCHAR(40), + `ORCHESTRATION_URI` VARCHAR(20), + `MODEL_PARAM_XSD` VARCHAR(20), + `RECIPE_TIMEOUT` INT(11), + `CREATION_TIMESTAMP` datetime not null default current_timestamp, + PRIMARY KEY (`ID`), + CONSTRAINT uk1_model_recipe UNIQUE (`MODEL_ID`, `ACTION`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +create table if not exists model ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_ID` VARCHAR(40), + `MODEL_CUSTOMIZATION_NAME` VARCHAR(40), + `MODEL_INVARIANT_ID` VARCHAR(40), + `MODEL_NAME` VARCHAR(40), + `MODEL_TYPE` VARCHAR(20), + `MODEL_VERSION` VARCHAR(20), + `MODEL_VERSION_ID` VARCHAR(40), + `CREATION_TIMESTAMP` datetime not null default current_timestamp, + `RECIPE` INT(11), + PRIMARY KEY (`ID`), + CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`), + FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
\ No newline at end of file |