aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/install/database
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2021-07-29 10:14:19 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2021-08-17 08:12:35 +0000
commit6e75dd1bfd8c1a4625c9c61a60883d28ca88fff7 (patch)
treea489c38d90b399e7c446e082c977aa3d4974ba94 /openecomp-be/tools/install/database
parent855a434b4f6555aa43091cdaeef14a33e418458d (diff)
Handle VSP package upload for multi-model
Change-Id: Iceca3f160eaeb1a6431fc3c5bbab92847e95ae4d Issue-ID: SDC-3667 Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/tools/install/database')
-rw-r--r--openecomp-be/tools/install/database/init_schemas.cql20
-rw-r--r--openecomp-be/tools/install/database/upgrade-scripts/20210729-dox.package_details.cql2
2 files changed, 21 insertions, 1 deletions
diff --git a/openecomp-be/tools/install/database/init_schemas.cql b/openecomp-be/tools/install/database/init_schemas.cql
index 0569a12f65..7e3bc0a0b2 100644
--- a/openecomp-be/tools/install/database/init_schemas.cql
+++ b/openecomp-be/tools/install/database/init_schemas.cql
@@ -4,7 +4,25 @@ CREATE TYPE IF NOT EXISTS user_candidate_version (version frozen<version>, user
CREATE TABLE IF NOT EXISTS version_info (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id));
CREATE TABLE IF NOT EXISTS version_info_deleted (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id));
CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)));
-CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version text,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text, RESOURCE_TYPE text, TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)));
+CREATE TABLE IF NOT EXISTS package_details
+(
+ VSP_ID text,
+ version text,
+ version_id text,
+ DISPLAY_NAME text,
+ vsp_name text,
+ vsp_description text,
+ VENDOR_NAME text,
+ CATEGORY text,
+ SUB_CATEGORY text,
+ VENDOR_RELEASE text,
+ PACKAGE_CHECKSUM text,
+ PACKAGE_TYPE text,
+ RESOURCE_TYPE text,
+ models set<text>,
+ TRANSLATE_CONTENT blob,
+ PRIMARY KEY ((VSP_ID, version))
+);
CREATE TABLE IF NOT EXISTS vsp_enriched_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
CREATE TABLE IF NOT EXISTS vsp_enriched_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name));
CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key));
diff --git a/openecomp-be/tools/install/database/upgrade-scripts/20210729-dox.package_details.cql b/openecomp-be/tools/install/database/upgrade-scripts/20210729-dox.package_details.cql
new file mode 100644
index 0000000000..9836fa7616
--- /dev/null
+++ b/openecomp-be/tools/install/database/upgrade-scripts/20210729-dox.package_details.cql
@@ -0,0 +1,2 @@
+ALTER TABLE dox.package_details ADD models set<text>;
+ALTER TABLE dox.package_details ADD version_id text; \ No newline at end of file