diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-02-08 09:24:26 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-02-08 11:34:05 +0000 |
commit | 864b6236aa7caa2e27f9e188c6e34666e2dce9be (patch) | |
tree | a9a31d65cdd0648201015a6dbd82592ee17258a7 | |
parent | 8a98552c7f5a0b58e3a524db24e8bfb47a4494b1 (diff) |
Improve MariaDB Sqls for db-migrator tool
Issue-ID: POLICY-4549
Change-Id: I4a1cd6514ae8025726ca015081632633ea49361a
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
62 files changed, 163 insertions, 139 deletions
diff --git a/policy-db-migrator/smoke-test/mariadb-tests.sh b/policy-db-migrator/smoke-test/mariadb-tests.sh index a5f1e31f..418a4740 100755 --- a/policy-db-migrator/smoke-test/mariadb-tests.sh +++ b/policy-db-migrator/smoke-test/mariadb-tests.sh @@ -31,12 +31,30 @@ export SCRIPT_DIRECTORY=sql # Test variables TOTAL_COUNT=0 -HONOLULU_UPGRADE_COUNT=$(ls /home/policy/sql/0800/upgrade/*.sql | wc -l) -HONOLULU_DOWNGRADE_COUNT=$(ls /home/policy/sql/0800/downgrade/*.sql | wc -l) -ISTANBUL_UPGRADE_COUNT=$(ls /home/policy/sql/0900/upgrade/*.sql | wc -l) -ISTANBUL_DOWNGRADE_COUNT=$(ls /home/policy/sql/0900/downgrade/*.sql | wc -l) -JAKARTA_UPGRADE_COUNT=$(ls /home/policy/sql/1000/upgrade/*.sql | wc -l) -JAKARTA_DOWNGRADE_COUNT=$(ls /home/policy/sql/1000/downgrade/*.sql | wc -l) +H_UPGRADE_COUNT=$(ls /home/policy/sql/0800/upgrade/*.sql | wc -l) +H_DOWNGRADE_COUNT=$(ls /home/policy/sql/0800/downgrade/*.sql | wc -l) +TOTAL_SQLS_UPGRADE=$H_UPGRADE_COUNT +TOTAL_SQLS_DOWNGRADE=$H_DOWNGRADE_COUNT + +I_UPGRADE_COUNT=$(ls /home/policy/sql/0900/upgrade/*.sql | wc -l) +I_DOWNGRADE_COUNT=$(ls /home/policy/sql/0900/downgrade/*.sql | wc -l) +TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$I_UPGRADE_COUNT)) +TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$I_DOWNGRADE_COUNT)) + +J_UPGRADE_COUNT=$(ls /home/policy/sql/1000/upgrade/*.sql | wc -l) +J_DOWNGRADE_COUNT=$(ls /home/policy/sql/1000/downgrade/*.sql | wc -l) +TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$J_UPGRADE_COUNT)) +TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$J_DOWNGRADE_COUNT)) + +K_UPGRADE_COUNT=$(ls /home/policy/sql/1100/upgrade/*.sql | wc -l) +K_DOWNGRADE_COUNT=$(ls /home/policy/sql/1100/downgrade/*.sql | wc -l) +TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$K_UPGRADE_COUNT)) +TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$K_DOWNGRADE_COUNT)) + +L_UPGRADE_COUNT=$(ls /home/policy/sql/1200/upgrade/*.sql | wc -l) +L_DOWNGRADE_COUNT=$(ls /home/policy/sql/1200/downgrade/*.sql | wc -l) +TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$L_UPGRADE_COUNT)) +TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$L_DOWNGRADE_COUNT)) NEW_SQL_EXECUTIONS=0 START_VERSION="" @@ -154,7 +172,7 @@ check_results() { start_test /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -t 0900 end_test -let TOTAL_COUNT=$HONOLULU_UPGRADE_COUNT+$ISTANBUL_UPGRADE_COUNT +let TOTAL_COUNT=$H_UPGRADE_COUNT+$I_UPGRADE_COUNT check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $RECENT_SQL_EXECUTIONS $TOTAL_COUNT sleep 5 @@ -165,7 +183,7 @@ start_test /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 0900 -t 0800 end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_DOWNGRADE_COUNT +check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT sleep 5 @@ -175,7 +193,7 @@ start_test /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -f 0800 -t 0900 end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_UPGRADE_COUNT +check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT sleep 5 @@ -188,7 +206,7 @@ run_sql "root" "${MYSQL_ROOT_PASSWORD}" "${SCHEMA}" "DROP DATABASE IF EXISTS mig /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade -t 0900 end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS -check_results $END_STATUS 'upgrade' "0800" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_UPGRADE_COUNT +check_results $END_STATUS 'upgrade' "0800" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT sleep 5 @@ -220,7 +238,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${IDX_TSIDX1}" end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS # +1 to run the file again -let TOTAL_COUNT=$ISTANBUL_DOWNGRADE_COUNT+1 +let TOTAL_COUNT=$I_UPGRADE_COUNT+1 check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT sleep 5 @@ -251,7 +269,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${PDPSTATISTICS}" end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS # +1 to run the file again -let TOTAL_COUNT=$ISTANBUL_UPGRADE_COUNT+1 +let TOTAL_COUNT=$I_UPGRADE_COUNT+1 check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT sleep 5 @@ -272,7 +290,7 @@ run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${SQL4}" end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS # +1 to run the file again -let TOTAL_COUNT=$ISTANBUL_UPGRADE_COUNT +let TOTAL_COUNT=$I_UPGRADE_COUNT check_results $END_STATUS 'upgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT sleep 5 @@ -286,7 +304,7 @@ sleep 1 run_sql "${SQL_USER}" "${SQL_PASSWORD}" "${SCHEMA}" "${SQL6}" end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $ISTANBUL_DOWNGRADE_COUNT +check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $I_UPGRADE_COUNT sleep 5 @@ -296,7 +314,7 @@ start_test /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 0800 end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $HONOLULU_DOWNGRADE_COUNT +check_results $END_STATUS 'downgrade' "${START_VERSION}" "${END_VERSION}" $NEW_SQL_EXECUTIONS $H_DOWNGRADE_COUNT sleep 5 @@ -306,19 +324,22 @@ start_test /opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -let TOTAL_COUNT=$HONOLULU_UPGRADE_COUNT+$ISTANBUL_UPGRADE_COUNT+$JAKARTA_UPGRADE_COUNT -check_results $END_STATUS 'upgrade' "0" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_COUNT +check_results $END_STATUS 'upgrade' "0" "${END_VERSION}" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_UPGRADE sleep 5 # Test 13 - Full downgrade start_test /opt/app/policy/bin/prepare_downgrade.sh ${SQL_DB} -/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1000 -t 0 +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o downgrade -f 1200 -t 0 end_test let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -let TOTAL_COUNT=$HONOLULU_DOWNGRADE_COUNT+$ISTANBUL_DOWNGRADE_COUNT+$JAKARTA_DOWNGRADE_COUNT -check_results $END_STATUS 'downgrade' "${START_VERSION}" "0" $NEW_SQL_EXECUTIONS $TOTAL_COUNT +check_results $END_STATUS 'downgrade' "${START_VERSION}" "0" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_DOWNGRADE + +# Install database +/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB} +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade +/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report echo echo "-----------------------------------------------------------------------" diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql index e38dba8d..d503999a 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0100-jpapdpgroup_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapdpgroup_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES VARCHAR(255) NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpapdpgroup_properties (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PROPERTIES VARCHAR(255) DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql index 6be5cf60..0adad152 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0110-jpapdpstatistics_enginestats.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapdpstatistics_enginestats (AVERAGEEXECUTIONTIME DOUBLE DEFAULT NULL NULL, ENGINEID VARCHAR(255) NULL, ENGINETIMESTAMP BIGINT DEFAULT NULL NULL, ENGINEWORKERSTATE INT DEFAULT NULL NULL, EVENTCOUNT BIGINT DEFAULT NULL NULL, LASTENTERTIME BIGINT DEFAULT NULL NULL, LASTEXECUTIONTIME BIGINT DEFAULT NULL NULL, LASTSTART BIGINT DEFAULT NULL NULL, UPTIME BIGINT DEFAULT NULL NULL, timeStamp datetime DEFAULT NULL NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL); +CREATE TABLE IF NOT EXISTS jpapdpstatistics_enginestats (AVERAGEEXECUTIONTIME DOUBLE DEFAULT NULL, ENGINEID VARCHAR(255) DEFAULT NULL, ENGINETIMESTAMP BIGINT DEFAULT NULL, ENGINEWORKERSTATE INT DEFAULT NULL, EVENTCOUNT BIGINT DEFAULT NULL, LASTENTERTIME BIGINT DEFAULT NULL, LASTEXECUTIONTIME BIGINT DEFAULT NULL, LASTSTART BIGINT DEFAULT NULL, UPTIME BIGINT DEFAULT NULL, timeStamp datetime DEFAULT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql index a2159746..8258cc49 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0120-jpapdpsubgroup_policies.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapdpsubgroup_policies (name VARCHAR(120) NULL, version VARCHAR(20) NULL, parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL); +CREATE TABLE IF NOT EXISTS jpapdpsubgroup_policies (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql index 84508c9a..2c3f74c3 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0130-jpapdpsubgroup_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapdpsubgroup_properties (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, PROPERTIES VARCHAR(255) NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpapdpsubgroup_properties (parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL, PROPERTIES VARCHAR(255) DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql index 323ee277..40e29421 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapdpsubgroup_supportedpolicytypes (name VARCHAR(120) NULL, version VARCHAR(20) NULL, parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL); +CREATE TABLE IF NOT EXISTS jpapdpsubgroup_supportedpolicytypes (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, parentLocalName VARCHAR(120) DEFAULT NULL, localName VARCHAR(120) DEFAULT NULL, parentKeyVersion VARCHAR(15) DEFAULT NULL, parentKeyName VARCHAR(120) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql index a097475f..932c2d01 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_attributes (name VARCHAR(120) NULL, version VARCHAR(20) NULL, ATTRIBUTES LONGTEXT NULL, ATTRIBUTES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_attributes (name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, ATTRIBUTES LONGTEXT DEFAULT NULL, ATTRIBUTES_KEY VARCHAR(255) DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql index c80aed43..b3851a41 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL); +CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql index 861144ae..7ef9dd73 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql index a4b985bf..77d5049c 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0230-jpatoscadatatype_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscadatatype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscadatatype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql index 759906c8..17d71144 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0270-jpatoscanodetype_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscanodetype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscanodetype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql index f17763e3..2c6a7f7a 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0320-jpatoscapolicytype_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscapolicytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscapolicytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql index 272dbb81..660b9bc0 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES LONGBLOB DEFAULT NULL, PROPERTIES_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql index 9d645483..8677964b 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0400-jpatoscarequirement_occurrences.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscarequirement_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL); +CREATE TABLE IF NOT EXISTS jpatoscarequirement_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql index 5f0b6a10..d5f6e7cc 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpatoscatopologytemplate_inputs (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, INPUTS LONGBLOB DEFAULT NULL NULL, INPUTS_KEY VARCHAR(255) NULL); +CREATE TABLE IF NOT EXISTS jpatoscatopologytemplate_inputs (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, INPUTS LONGBLOB DEFAULT NULL, INPUTS_KEY VARCHAR(255) NULL); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql index 48fd2db0..d07479c9 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdpgroup_pdpsubgroup (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPGROUP_PDPSUBGROUP PRIMARY KEY (name, version, parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS pdpgroup_pdpsubgroup (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPGROUP_PDPSUBGROUP (name, version, parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql index 336c176d..369f9a0d 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0450-pdpgroup.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdpgroup (`DESCRIPTION` VARCHAR(255) NULL, PDPGROUPSTATE INT DEFAULT NULL NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_PDPGROUP PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS pdpgroup (`DESCRIPTION` VARCHAR(255) NULL, PDPGROUPSTATE INT DEFAULT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_PDPGROUP (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql index 9faa075b..c6541e97 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0460-pdppolicystatus.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdppolicystatus (DEPLOY BIT DEFAULT 0 NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, STATE INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_PDPPOLICYSTATUS PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS pdppolicystatus (DEPLOY BOOLEAN DEFAULT 0, PDPGROUP VARCHAR(255) DEFAULT NULL, PDPTYPE VARCHAR(255) DEFAULT NULL, STATE INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PRIMARY KEY PK_PDPPOLICYSTATUS (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql index e325bdbc..cb4a2911 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0470-pdp.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdp (HEALTHY INT DEFAULT NULL NULL, MESSAGE VARCHAR(255) NULL, PDPSTATE INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDP PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS pdp (HEALTHY INT DEFAULT NULL, MESSAGE VARCHAR(255) DEFAULT NULL, PDPSTATE INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDP (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql index 8f67e6b8..60111fe8 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0480-pdpstatistics.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdpstatistics (PDPGROUPNAME VARCHAR(120) NULL, PDPSUBGROUPNAME VARCHAR(120) NULL, POLICYDEPLOYCOUNT BIGINT DEFAULT NULL NULL, POLICYDEPLOYFAILCOUNT BIGINT DEFAULT NULL NULL, POLICYDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDFAILCOUNT BIGINT DEFAULT NULL NULL, POLICYEXECUTEDSUCCESSCOUNT BIGINT DEFAULT NULL NULL, timeStamp datetime NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_PDPSTATISTICS PRIMARY KEY (timeStamp, name, version)); +CREATE TABLE IF NOT EXISTS pdpstatistics (PDPGROUPNAME VARCHAR(120) NULL, PDPSUBGROUPNAME VARCHAR(120) NULL, POLICYDEPLOYCOUNT BIGINT DEFAULT NULL, POLICYDEPLOYFAILCOUNT BIGINT DEFAULT NULL, POLICYDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDFAILCOUNT BIGINT DEFAULT NULL, POLICYEXECUTEDSUCCESSCOUNT BIGINT DEFAULT NULL, timeStamp datetime NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_PDPSTATISTICS (timeStamp, name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql index 852ef77f..f5ee1640 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0490-pdpsubgroup_pdp.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdpsubgroup_pdp (pdpParentKeyName VARCHAR(120) NOT NULL, pdpParentKeyVersion VARCHAR(15) NOT NULL, pdpParentLocalName VARCHAR(120) NOT NULL, pdpLocalName VARCHAR(120) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPSUBGROUP_PDP PRIMARY KEY (pdpParentKeyName, pdpParentKeyVersion, pdpParentLocalName, pdpLocalName, parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS pdpsubgroup_pdp (pdpParentKeyName VARCHAR(120) NOT NULL, pdpParentKeyVersion VARCHAR(15) NOT NULL, pdpParentLocalName VARCHAR(120) NOT NULL, pdpLocalName VARCHAR(120) NOT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPSUBGROUP_PDP (pdpParentKeyName, pdpParentKeyVersion, pdpParentLocalName, pdpLocalName, parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql index 381c9e01..a762c86c 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0500-pdpsubgroup.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS pdpsubgroup (CURRENTINSTANCECOUNT INT DEFAULT NULL NULL, DESIREDINSTANCECOUNT INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_PDPSUBGROUP PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS pdpsubgroup (CURRENTINSTANCECOUNT INT DEFAULT NULL, DESIREDINSTANCECOUNT INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_PDPSUBGROUP (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql index b3a308e8..3bc2c2ea 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0510-toscacapabilityassignment.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilityassignment (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENT PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscacapabilityassignment (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENT(name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql index a1071197..963cbb7c 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0520-toscacapabilityassignments.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilityassignments (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENTS PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscacapabilityassignments (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENTS (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql index 1ab54b8f..c8965d78 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilityassignments_toscacapabilityassignment (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCACAPABILITYASSIGNMENTS_TOSCACAPABILITYASSIGNMENT PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscacapabilityassignments_toscacapabilityassignment (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCACAPABILITYASSIGNMENTS_TOSCACAPABILITYASSIGNMENT (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql index 39a094af..26f7fe42 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0540-toscacapabilitytype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilitytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYTYPE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscacapabilitytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql index 778ec042..be906e8f 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0550-toscacapabilitytypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilitytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCACAPABILITYTYPES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscacapabilitytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql index 4f7f3787..bef95709 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscacapabilitytypes_toscacapabilitytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCACAPABILITYTYPES_TOSCACAPABILITYTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscacapabilitytypes_toscacapabilitytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCACAPABILITYTYPES_TOSCACAPABILITYTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql index f22c3c69..31237a30 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0570-toscadatatype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscadatatype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCADATATYPE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscadatatype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCADATATYPE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql index df5dc545..b18b5b0a 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0580-toscadatatypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscadatatypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCADATATYPES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscadatatypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCADATATYPES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql index 1cee4eba..b45828e5 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0590-toscadatatypes_toscadatatype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscadatatypes_toscadatatype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCADATATYPES_TOSCADATATYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscadatatypes_toscadatatype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCADATATYPES_TOSCADATATYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql index 76b68809..6b8d3f5e 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0600-toscanodetemplate.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetemplate (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, capabilitiesName VARCHAR(120) NULL, capabilitiesVersion VARCHAR(20) NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, CONSTRAINT PK_TOSCANODETEMPLATE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscanodetemplate (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, capabilitiesName VARCHAR(120) NULL, capabilitiesVersion VARCHAR(20) NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCANODETEMPLATE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql index 6c82b8da..e813ba8d 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0610-toscanodetemplates.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetemplates (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCANODETEMPLATES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscanodetemplates (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCANODETEMPLATES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql index 5be6b268..6ed201ca 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetemplates_toscanodetemplate (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCANODETEMPLATES_TOSCANODETEMPLATE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscanodetemplates_toscanodetemplate (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCANODETEMPLATES_TOSCANODETEMPLATE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql index 3bad7c73..6c168704 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0630-toscanodetype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, CONSTRAINT PK_TOSCANODETYPE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscanodetype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, requirementsVersion VARCHAR(20) NULL, requirementsName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCANODETYPE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql index 06a8a189..5aed2a32 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0640-toscanodetypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCANODETYPES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscanodetypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCANODETYPES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql index 70b19a11..4139e179 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0650-toscanodetypes_toscanodetype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscanodetypes_toscanodetype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCANODETYPES_TOSCANODETYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscanodetypes_toscanodetype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCANODETYPES_TOSCANODETYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql index 77d61f5d..de6380e8 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0660-toscaparameter.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPARAMETER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPARAMETER (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql index a64b0779..dcb9bdc9 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0670-toscapolicies.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicies (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICIES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscapolicies (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICIES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql index dea2a44c..46ff20e9 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0680-toscapolicies_toscapolicy.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicies_toscapolicy (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPOLICIES_TOSCAPOLICY PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscapolicies_toscapolicy (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPOLICIES_TOSCAPOLICY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql index a69b0215..ec7dd6e3 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0690-toscapolicy.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicy (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCAPOLICY PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscapolicy (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCAPOLICY (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql index ef5c9d56..d54eeb66 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0700-toscapolicytype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICYTYPE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscapolicytype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICYTYPE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql index 956faa48..e9edf3f6 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0710-toscapolicytypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAPOLICYTYPES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscapolicytypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAPOLICYTYPES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql index e1442c74..9a1a6d15 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscapolicytypes_toscapolicytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPOLICYTYPES_TOSCAPOLICYTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscapolicytypes_toscapolicytype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPOLICYTYPES_TOSCAPOLICYTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql index 5d1ef960..9ea23427 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0730-toscaproperty.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPROPERTY PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) DEFAULT NULL, `DESCRIPTION` VARCHAR(255) DEFAULT NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL, REQUIRED BOOLEAN DEFAULT 0, STATUS INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) DEFAULT NULL, version VARCHAR(20) DEFAULT NULL, PRIMARY KEY PK_TOSCAPROPERTY (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql index b007911d..b70015e4 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0740-toscarelationshiptype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarelationshiptype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscarelationshiptype (`DESCRIPTION` VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql index a07ab0db..37e46fb3 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0750-toscarelationshiptypes.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarelationshiptypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPES PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscarelationshiptypes (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPES (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql index 883a98ce..174513d8 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarelationshiptypes_toscarelationshiptype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCARELATIONSHIPTYPES_TOSCARELATIONSHIPTYPE PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscarelationshiptypes_toscarelationshiptype (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCARELATIONSHIPTYPES_TOSCARELATIONSHIPTYPE (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql index d29edfba..e87703b7 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0770-toscarequirement.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarequirement (CAPABILITY VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, NODE VARCHAR(255) NULL, RELATIONSHIP VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, CONSTRAINT PK_TOSCAREQUIREMENT PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscarequirement (CAPABILITY VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, NODE VARCHAR(255) NULL, RELATIONSHIP VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, type_name VARCHAR(255) NULL, type_version VARCHAR(255) NULL, PRIMARY KEY PK_TOSCAREQUIREMENT (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql index 6b2ac078..7ad0bda6 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0780-toscarequirements.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarequirements (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_TOSCAREQUIREMENTS PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscarequirements (name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_TOSCAREQUIREMENTS (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql index 884ad903..68a74a96 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0790-toscarequirements_toscarequirement.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscarequirements_toscarequirement (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAREQUIREMENTS_TOSCAREQUIREMENT PRIMARY KEY (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); +CREATE TABLE IF NOT EXISTS toscarequirements_toscarequirement (conceptContainerMapName VARCHAR(120) NOT NULL, concpetContainerMapVersion VARCHAR(20) NOT NULL, conceptContainerName VARCHAR(120) NOT NULL, conceptContainerVersion VARCHAR(20) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAREQUIREMENTS_TOSCAREQUIREMENT (conceptContainerMapName, concpetContainerMapVersion, conceptContainerName, conceptContainerVersion)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql index 396499fd..4eb31d34 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0800-toscaservicetemplate.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscaservicetemplate (`DESCRIPTION` VARCHAR(255) NULL, TOSCADEFINITIONSVERSION VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, capabilityTypesVersion VARCHAR(20) NULL, capabilityTypesName VARCHAR(120) NULL, dataTypesName VARCHAR(120) NULL, dataTypesVersion VARCHAR(20) NULL, nodeTypesVersion VARCHAR(20) NULL, nodeTypesName VARCHAR(120) NULL, policyTypesName VARCHAR(120) NULL, policyTypesVersion VARCHAR(20) NULL, relationshipTypesVersion VARCHAR(20) NULL, relationshipTypesName VARCHAR(120) NULL, topologyTemplateLocalName VARCHAR(120) NULL, topologyTemplateParentKeyName VARCHAR(120) NULL, topologyTemplateParentKeyVersion VARCHAR(15) NULL, topologyTemplateParentLocalName VARCHAR(120) NULL, CONSTRAINT PK_TOSCASERVICETEMPLATE PRIMARY KEY (name, version)); +CREATE TABLE IF NOT EXISTS toscaservicetemplate (`DESCRIPTION` VARCHAR(255) NULL, TOSCADEFINITIONSVERSION VARCHAR(255) NULL, derived_from_name VARCHAR(255) NULL, derived_from_version VARCHAR(255) NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, capabilityTypesVersion VARCHAR(20) NULL, capabilityTypesName VARCHAR(120) NULL, dataTypesName VARCHAR(120) NULL, dataTypesVersion VARCHAR(20) NULL, nodeTypesVersion VARCHAR(20) NULL, nodeTypesName VARCHAR(120) NULL, policyTypesName VARCHAR(120) NULL, policyTypesVersion VARCHAR(20) NULL, relationshipTypesVersion VARCHAR(20) NULL, relationshipTypesName VARCHAR(120) NULL, topologyTemplateLocalName VARCHAR(120) NULL, topologyTemplateParentKeyName VARCHAR(120) NULL, topologyTemplateParentKeyVersion VARCHAR(15) NULL, topologyTemplateParentLocalName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCASERVICETEMPLATE (name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql index 92d51d92..cbb6dbd8 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0810-toscatopologytemplate.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscatopologytemplate (`description` VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, nodeTemplatessVersion VARCHAR(20) NULL, nodeTemplatesName VARCHAR(120) NULL, policyVersion VARCHAR(20) NULL, policyName VARCHAR(120) NULL, CONSTRAINT PK_TOSCATOPOLOGYTEMPLATE PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscatopologytemplate (`description` VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, nodeTemplatessVersion VARCHAR(20) NULL, nodeTemplatesName VARCHAR(120) NULL, policyVersion VARCHAR(20) NULL, policyName VARCHAR(120) NULL, PRIMARY KEY PK_TOSCATOPOLOGYTEMPLATE (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql index 45862f8d..279e05dc 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0800/upgrade/0820-toscatrigger.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL NULL, toscaConstraint LONGBLOB DEFAULT NULL NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL NULL, SCHEDULE LONGBLOB DEFAULT NULL NULL, TARGETFILTER LONGBLOB DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_TOSCATRIGGER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL, toscaConstraint LONGBLOB DEFAULT NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL, SCHEDULE LONGBLOB DEFAULT NULL, TARGETFILTER LONGBLOB DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_TOSCATRIGGER (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql index eb8f6a0f..bd66524e 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/downgrade/0180-jpapdpstatistics_enginestats.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime(6) DEFAULT NULL NULL AFTER UPTIME; +ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime(6) DEFAULT NULL AFTER UPTIME; diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql index c4a1123e..51dcd3b1 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0130-pdpstatistics.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL NULL AFTER POLICYEXECUTEDSUCCESSCOUNT, ADD COLUMN POLICYUNDEPLOYFAILCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN POLICYUNDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN ID BIGINT NOT NULL; +ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL AFTER POLICYEXECUTEDSUCCESSCOUNT, ADD COLUMN POLICYUNDEPLOYFAILCOUNT BIGINT DEFAULT NULL, ADD COLUMN POLICYUNDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL, ADD COLUMN ID BIGINT NOT NULL; diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql index 6e5bfecd..cc3f9a82 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0160-jpapdpstatistics_enginestats.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN ID BIGINT DEFAULT NULL NULL AFTER UPTIME; +ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN ID BIGINT DEFAULT NULL AFTER UPTIME; diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql index a31d2421..ca5137de 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0190-jpapolicyaudit.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS jpapolicyaudit (ACTION INT DEFAULT NULL NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, TIMESTAMP datetime DEFAULT NULL NULL, USER VARCHAR(255) NULL, ID BIGINT NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_JPAPOLICYAUDIT PRIMARY KEY (ID, name, version)); +CREATE TABLE IF NOT EXISTS jpapolicyaudit (ACTION INT DEFAULT NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, TIMESTAMP datetime DEFAULT NULL, USER VARCHAR(255) NULL, ID BIGINT NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY PK_JPAPOLICYAUDIT (ID, name, version)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql index 64d6f01b..43dfe42a 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/0900/upgrade/0210-sequence.sql @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021, 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL NULL, CONSTRAINT PK_SEQUENCE PRIMARY KEY (SEQ_NAME)); +CREATE TABLE IF NOT EXISTS sequence (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38) DEFAULT NULL, PRIMARY KEY PK_SEQUENCE (SEQ_NAME)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql index d701bd45..5aa86c03 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0120-toscatrigger.sql @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2022 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +18,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL NULL, toscaConstraint LONGBLOB DEFAULT NULL NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL NULL, SCHEDULE LONGBLOB DEFAULT NULL NULL, TARGETFILTER LONGBLOB DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, CONSTRAINT PK_TOSCATRIGGER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition LONGBLOB DEFAULT NULL, toscaConstraint LONGBLOB DEFAULT NULL, `DESCRIPTION` VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, `PERIOD` LONGBLOB DEFAULT NULL, SCHEDULE LONGBLOB DEFAULT NULL, TARGETFILTER LONGBLOB DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, PRIMARY KEY PK_TOSCATRIGGER (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql index 51db2ab9..da2e66f7 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0140-toscaparameter.sql @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2022 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +18,4 @@ * ============LICENSE_END========================================================= */ -CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPARAMETER PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscaparameter (VALUE VARCHAR(255) NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPARAMETER (parentLocalName, localName, parentKeyVersion, parentKeyName)); diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql index eef07f93..c99ae0e7 100644 --- a/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql +++ b/policy-db-migrator/src/main/docker/config/policyadmin/sql/1000/downgrade/0150-toscaproperty.sql @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2022 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,4 +20,4 @@ CREATE TABLE IF NOT EXISTS jpatoscaproperty_constraints (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, CONSTRAINTS VARCHAR(255) NULL); CREATE TABLE IF NOT EXISTS jpatoscaproperty_metadata (parentLocalName VARCHAR(120) NULL, localName VARCHAR(120) NULL, parentKeyVersion VARCHAR(15) NULL, parentKeyName VARCHAR(120) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL); -CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINT PK_TOSCAPROPERTY PRIMARY KEY (parentLocalName, localName, parentKeyVersion, parentKeyName)); +CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, `DESCRIPTION` VARCHAR(255) NULL, ENTRYSCHEMA LONGBLOB DEFAULT NULL, REQUIRED BIT DEFAULT 0 NULL, STATUS INT DEFAULT NULL, parentLocalName VARCHAR(120) NOT NULL, localName VARCHAR(120) NOT NULL, parentKeyVersion VARCHAR(15) NOT NULL, parentKeyName VARCHAR(120) NOT NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL, PRIMARY KEY PK_TOSCAPROPERTY (parentLocalName, localName, parentKeyVersion, parentKeyName)); |