aboutsummaryrefslogtreecommitdiffstats
path: root/policy-db-migrator
diff options
context:
space:
mode:
Diffstat (limited to 'policy-db-migrator')
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0100-jpapdpgroup_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0110-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0120-jpapdpsubgroup_policies.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0130-jpapdpsubgroup_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0150-jpatoscacapabilityassignment_attributes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0160-jpatoscacapabilityassignment_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0170-jpatoscacapabilityassignment_occurrences.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0180-jpatoscacapabilityassignment_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0190-jpatoscacapabilitytype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0200-jpatoscacapabilitytype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0210-jpatoscadatatype_constraints.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0220-jpatoscadatatype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0230-jpatoscadatatype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0240-jpatoscanodetemplate_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0250-jpatoscanodetemplate_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0260-jpatoscanodetype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0270-jpatoscanodetype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0280-jpatoscapolicy_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0290-jpatoscapolicy_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0300-jpatoscapolicy_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0310-jpatoscapolicytype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0320-jpatoscapolicytype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0330-jpatoscapolicytype_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0340-jpatoscapolicytype_triggers.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0350-jpatoscaproperty_constraints.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0360-jpatoscaproperty_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0370-jpatoscarelationshiptype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0380-jpatoscarelationshiptype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0390-jpatoscarequirement_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0400-jpatoscarequirement_occurrences.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0410-jpatoscarequirement_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0420-jpatoscaservicetemplate_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0430-jpatoscatopologytemplate_inputs.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0440-pdpgroup_pdpsubgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0450-pdpgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0460-pdppolicystatus.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0470-pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0480-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0490-pdpsubgroup_pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0500-pdpsubgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0510-toscacapabilityassignment.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0520-toscacapabilityassignments.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0540-toscacapabilitytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0550-toscacapabilitytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0570-toscadatatype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0580-toscadatatypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0590-toscadatatypes_toscadatatype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0600-toscanodetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0610-toscanodetemplates.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0620-toscanodetemplates_toscanodetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0630-toscanodetype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0640-toscanodetypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0650-toscanodetypes_toscanodetype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0660-toscaparameter.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0670-toscapolicies.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0680-toscapolicies_toscapolicy.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0690-toscapolicy.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0700-toscapolicytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0710-toscapolicytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0720-toscapolicytypes_toscapolicytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0730-toscaproperty.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0740-toscarelationshiptype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0750-toscarelationshiptypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0770-toscarequirement.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0780-toscarequirements.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0790-toscarequirements_toscarequirement.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0800-toscaservicetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0810-toscatopologytemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0820-toscatrigger.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0850-FK_ToscaNodeType_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0920-FK_ToscaTopologyTemplate_policyName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0940-PdpPolicyStatus_PdpGroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0980-FK_ToscaNodeType_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1050-FK_ToscaTopologyTemplate_policyName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0100-jpapdpgroup_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0110-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0120-jpapdpsubgroup_policies.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0130-jpapdpsubgroup_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0160-jpatoscacapabilityassignment_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0180-jpatoscacapabilityassignment_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0190-jpatoscacapabilitytype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0210-jpatoscadatatype_constraints.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0220-jpatoscadatatype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0230-jpatoscadatatype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0240-jpatoscanodetemplate_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0250-jpatoscanodetemplate_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0260-jpatoscanodetype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0270-jpatoscanodetype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0280-jpatoscapolicy_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0290-jpatoscapolicy_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0300-jpatoscapolicy_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0310-jpatoscapolicytype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0320-jpatoscapolicytype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0330-jpatoscapolicytype_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0340-jpatoscapolicytype_triggers.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0350-jpatoscaproperty_constraints.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0360-jpatoscaproperty_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0370-jpatoscarelationshiptype_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0390-jpatoscarequirement_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0400-jpatoscarequirement_occurrences.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0410-jpatoscarequirement_properties.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0420-jpatoscaservicetemplate_metadata.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0450-pdpgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0460-pdppolicystatus.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0470-pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0480-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0490-pdpsubgroup_pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0500-pdpsubgroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0510-toscacapabilityassignment.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0520-toscacapabilityassignments.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0540-toscacapabilitytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0550-toscacapabilitytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0570-toscadatatype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0580-toscadatatypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0590-toscadatatypes_toscadatatype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0600-toscanodetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0610-toscanodetemplates.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0630-toscanodetype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0640-toscanodetypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0650-toscanodetypes_toscanodetype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0660-toscaparameter.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0670-toscapolicies.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0680-toscapolicies_toscapolicy.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0690-toscapolicy.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0700-toscapolicytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0710-toscapolicytypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0730-toscaproperty.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0740-toscarelationshiptype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0750-toscarelationshiptypes.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0770-toscarequirement.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0780-toscarequirements.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0790-toscarequirements_toscarequirement.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0800-toscaservicetemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0810-toscatopologytemplate.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0820-toscatrigger.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0850-FK_ToscaNodeType_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0920-FK_ToscaTopologyTemplate_policyName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0940-PdpPolicyStatus_PdpGroup.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0980-FK_ToscaNodeType_requirementsName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1050-FK_ToscaTopologyTemplate_policyName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0100-pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0110-idx_tsidx1.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0120-pk_pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0130-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0140-pk_pdpstatistics.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0150-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0160-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0170-jpapdpstatistics_enginestats.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0180-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0190-jpapolicyaudit.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0200-JpaPolicyAuditIndex_timestamp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0210-sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0220-sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0100-pdp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0110-idx_tsidx1.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0120-pk_pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0130-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0140-pk_pdpstatistics.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0150-pdpstatistics.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0160-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0170-jpapdpstatistics_enginestats.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0180-jpapdpstatistics_enginestats.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0190-jpapolicyaudit.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0200-JpaPolicyAuditIndex_timestamp.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0210-sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0220-sequence.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0100-jpatoscapolicy_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0110-jpatoscapolicytype_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0120-toscatrigger.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0130-jpatoscapolicytype_triggers.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0140-toscaparameter.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0150-toscaproperty.sql22
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0100-jpatoscapolicy_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0110-jpatoscapolicytype_targets.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0120-toscatrigger.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0130-jpatoscapolicytype_triggers.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0140-toscaparameter.sql20
-rw-r--r--policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0150-toscaproperty.sql22
230 files changed, 4612 insertions, 0 deletions
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0100-jpapdpgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0100-jpapdpgroup_properties.sql
new file mode 100644
index 00000000..742c3c39
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0100-jpapdpgroup_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapdpgroup_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0110-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0110-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..cdd6f888
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0110-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapdpstatistics_enginestats;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0120-jpapdpsubgroup_policies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0120-jpapdpsubgroup_policies.sql
new file mode 100644
index 00000000..d1daac4f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0120-jpapdpsubgroup_policies.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapdpsubgroup_policies;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0130-jpapdpsubgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0130-jpapdpsubgroup_properties.sql
new file mode 100644
index 00000000..5e2282ff
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0130-jpapdpsubgroup_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapdpsubgroup_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
new file mode 100644
index 00000000..6fa8f4b4
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapdpsubgroup_supportedpolicytypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0150-jpatoscacapabilityassignment_attributes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0150-jpatoscacapabilityassignment_attributes.sql
new file mode 100644
index 00000000..c8f9802c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0150-jpatoscacapabilityassignment_attributes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilityassignment_attributes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0160-jpatoscacapabilityassignment_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0160-jpatoscacapabilityassignment_metadata.sql
new file mode 100644
index 00000000..28cc0372
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0160-jpatoscacapabilityassignment_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilityassignment_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0170-jpatoscacapabilityassignment_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0170-jpatoscacapabilityassignment_occurrences.sql
new file mode 100644
index 00000000..9d2dbd59
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0170-jpatoscacapabilityassignment_occurrences.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilityassignment_occurrences;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0180-jpatoscacapabilityassignment_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0180-jpatoscacapabilityassignment_properties.sql
new file mode 100644
index 00000000..c52de8bc
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0180-jpatoscacapabilityassignment_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilityassignment_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0190-jpatoscacapabilitytype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0190-jpatoscacapabilitytype_metadata.sql
new file mode 100644
index 00000000..b5e1bf67
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0190-jpatoscacapabilitytype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilitytype_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0200-jpatoscacapabilitytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0200-jpatoscacapabilitytype_properties.sql
new file mode 100644
index 00000000..967b7cf3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0200-jpatoscacapabilitytype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscacapabilitytype_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0210-jpatoscadatatype_constraints.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0210-jpatoscadatatype_constraints.sql
new file mode 100644
index 00000000..10164a81
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0210-jpatoscadatatype_constraints.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscadatatype_constraints;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0220-jpatoscadatatype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0220-jpatoscadatatype_metadata.sql
new file mode 100644
index 00000000..0c2ffa85
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0220-jpatoscadatatype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscadatatype_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0230-jpatoscadatatype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0230-jpatoscadatatype_properties.sql
new file mode 100644
index 00000000..dd47d306
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0230-jpatoscadatatype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscadatatype_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0240-jpatoscanodetemplate_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0240-jpatoscanodetemplate_metadata.sql
new file mode 100644
index 00000000..f77c8184
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0240-jpatoscanodetemplate_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscanodetemplate_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0250-jpatoscanodetemplate_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0250-jpatoscanodetemplate_properties.sql
new file mode 100644
index 00000000..65ea2665
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0250-jpatoscanodetemplate_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscanodetemplate_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0260-jpatoscanodetype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0260-jpatoscanodetype_metadata.sql
new file mode 100644
index 00000000..547fd5b8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0260-jpatoscanodetype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscanodetype_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0270-jpatoscanodetype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0270-jpatoscanodetype_properties.sql
new file mode 100644
index 00000000..4e6d09c6
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0270-jpatoscanodetype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscanodetype_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0280-jpatoscapolicy_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0280-jpatoscapolicy_metadata.sql
new file mode 100644
index 00000000..b5a14c42
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0280-jpatoscapolicy_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicy_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0290-jpatoscapolicy_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0290-jpatoscapolicy_properties.sql
new file mode 100644
index 00000000..7ec88c11
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0290-jpatoscapolicy_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicy_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0300-jpatoscapolicy_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0300-jpatoscapolicy_targets.sql
new file mode 100644
index 00000000..ccd93e99
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0300-jpatoscapolicy_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicy_targets;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0310-jpatoscapolicytype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0310-jpatoscapolicytype_metadata.sql
new file mode 100644
index 00000000..7978620f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0310-jpatoscapolicytype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicytype_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0320-jpatoscapolicytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0320-jpatoscapolicytype_properties.sql
new file mode 100644
index 00000000..f9bd2a21
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0320-jpatoscapolicytype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicytype_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0330-jpatoscapolicytype_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0330-jpatoscapolicytype_targets.sql
new file mode 100644
index 00000000..feced0fd
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0330-jpatoscapolicytype_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicytype_targets;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0340-jpatoscapolicytype_triggers.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0340-jpatoscapolicytype_triggers.sql
new file mode 100644
index 00000000..cb01ee7f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0340-jpatoscapolicytype_triggers.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscapolicytype_triggers;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0350-jpatoscaproperty_constraints.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0350-jpatoscaproperty_constraints.sql
new file mode 100644
index 00000000..75f2e40a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0350-jpatoscaproperty_constraints.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscaproperty_constraints;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0360-jpatoscaproperty_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0360-jpatoscaproperty_metadata.sql
new file mode 100644
index 00000000..3321330e
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0360-jpatoscaproperty_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscaproperty_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0370-jpatoscarelationshiptype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0370-jpatoscarelationshiptype_metadata.sql
new file mode 100644
index 00000000..546a5810
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0370-jpatoscarelationshiptype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscarelationshiptype_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0380-jpatoscarelationshiptype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0380-jpatoscarelationshiptype_properties.sql
new file mode 100644
index 00000000..babb6014
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0380-jpatoscarelationshiptype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscarelationshiptype_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0390-jpatoscarequirement_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0390-jpatoscarequirement_metadata.sql
new file mode 100644
index 00000000..611e7752
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0390-jpatoscarequirement_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscarequirement_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0400-jpatoscarequirement_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0400-jpatoscarequirement_occurrences.sql
new file mode 100644
index 00000000..aa73cfff
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0400-jpatoscarequirement_occurrences.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscarequirement_occurrences;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0410-jpatoscarequirement_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0410-jpatoscarequirement_properties.sql
new file mode 100644
index 00000000..bb193bd1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0410-jpatoscarequirement_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscarequirement_properties;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0420-jpatoscaservicetemplate_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0420-jpatoscaservicetemplate_metadata.sql
new file mode 100644
index 00000000..61495dae
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0420-jpatoscaservicetemplate_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscaservicetemplate_metadata;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0430-jpatoscatopologytemplate_inputs.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0430-jpatoscatopologytemplate_inputs.sql
new file mode 100644
index 00000000..0703e927
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0430-jpatoscatopologytemplate_inputs.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscatopologytemplate_inputs;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0440-pdpgroup_pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0440-pdpgroup_pdpsubgroup.sql
new file mode 100644
index 00000000..ff65b1cb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0440-pdpgroup_pdpsubgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdpgroup_pdpsubgroup;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0450-pdpgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0450-pdpgroup.sql
new file mode 100644
index 00000000..88372350
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0450-pdpgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdpgroup;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0460-pdppolicystatus.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0460-pdppolicystatus.sql
new file mode 100644
index 00000000..b9ceafb8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0460-pdppolicystatus.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdppolicystatus;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0470-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0470-pdp.sql
new file mode 100644
index 00000000..7b127b7a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0470-pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdp;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0480-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0480-pdpstatistics.sql
new file mode 100644
index 00000000..e9bf185c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0480-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdpstatistics;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0490-pdpsubgroup_pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0490-pdpsubgroup_pdp.sql
new file mode 100644
index 00000000..6dfb80f9
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0490-pdpsubgroup_pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdpsubgroup_pdp;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0500-pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0500-pdpsubgroup.sql
new file mode 100644
index 00000000..7cfa14c8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0500-pdpsubgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS pdpsubgroup;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0510-toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0510-toscacapabilityassignment.sql
new file mode 100644
index 00000000..86552a1b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0510-toscacapabilityassignment.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilityassignment;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0520-toscacapabilityassignments.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0520-toscacapabilityassignments.sql
new file mode 100644
index 00000000..e29d798a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0520-toscacapabilityassignments.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilityassignments;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
new file mode 100644
index 00000000..6a95ade1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilityassignments_toscacapabilityassignment;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0540-toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0540-toscacapabilitytype.sql
new file mode 100644
index 00000000..62fe7955
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0540-toscacapabilitytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilitytype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0550-toscacapabilitytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0550-toscacapabilitytypes.sql
new file mode 100644
index 00000000..2da7e0aa
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0550-toscacapabilitytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilitytypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
new file mode 100644
index 00000000..385652e8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscacapabilitytypes_toscacapabilitytype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0570-toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0570-toscadatatype.sql
new file mode 100644
index 00000000..36e4926a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0570-toscadatatype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscadatatype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0580-toscadatatypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0580-toscadatatypes.sql
new file mode 100644
index 00000000..57c3115c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0580-toscadatatypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscadatatypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0590-toscadatatypes_toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0590-toscadatatypes_toscadatatype.sql
new file mode 100644
index 00000000..8586ea66
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0590-toscadatatypes_toscadatatype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscadatatypes_toscadatatype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0600-toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0600-toscanodetemplate.sql
new file mode 100644
index 00000000..3e8ef517
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0600-toscanodetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetemplate;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0610-toscanodetemplates.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0610-toscanodetemplates.sql
new file mode 100644
index 00000000..ca531420
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0610-toscanodetemplates.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetemplates;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0620-toscanodetemplates_toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0620-toscanodetemplates_toscanodetemplate.sql
new file mode 100644
index 00000000..a2f3ce32
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0620-toscanodetemplates_toscanodetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetemplates_toscanodetemplate;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0630-toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0630-toscanodetype.sql
new file mode 100644
index 00000000..8677afa3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0630-toscanodetype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0640-toscanodetypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0640-toscanodetypes.sql
new file mode 100644
index 00000000..b3941198
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0640-toscanodetypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0650-toscanodetypes_toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0650-toscanodetypes_toscanodetype.sql
new file mode 100644
index 00000000..2cd8607c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0650-toscanodetypes_toscanodetype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscanodetypes_toscanodetype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0660-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0660-toscaparameter.sql
new file mode 100644
index 00000000..02c7a738
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0660-toscaparameter.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscaparameter;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0670-toscapolicies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0670-toscapolicies.sql
new file mode 100644
index 00000000..e53908e8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0670-toscapolicies.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicies;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0680-toscapolicies_toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0680-toscapolicies_toscapolicy.sql
new file mode 100644
index 00000000..88f7fad6
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0680-toscapolicies_toscapolicy.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicies_toscapolicy;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0690-toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0690-toscapolicy.sql
new file mode 100644
index 00000000..a81f925f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0690-toscapolicy.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicy;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0700-toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0700-toscapolicytype.sql
new file mode 100644
index 00000000..7a526e61
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0700-toscapolicytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicytype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0710-toscapolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0710-toscapolicytypes.sql
new file mode 100644
index 00000000..afd60829
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0710-toscapolicytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicytypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0720-toscapolicytypes_toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0720-toscapolicytypes_toscapolicytype.sql
new file mode 100644
index 00000000..3ae1ca27
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0720-toscapolicytypes_toscapolicytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscapolicytypes_toscapolicytype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0730-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0730-toscaproperty.sql
new file mode 100644
index 00000000..e5e7ebf5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0730-toscaproperty.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscaproperty;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0740-toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0740-toscarelationshiptype.sql
new file mode 100644
index 00000000..ba596f0d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0740-toscarelationshiptype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarelationshiptype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0750-toscarelationshiptypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0750-toscarelationshiptypes.sql
new file mode 100644
index 00000000..417922a8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0750-toscarelationshiptypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarelationshiptypes;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
new file mode 100644
index 00000000..dc40af52
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarelationshiptypes_toscarelationshiptype;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0770-toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0770-toscarequirement.sql
new file mode 100644
index 00000000..0b674d56
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0770-toscarequirement.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarequirement;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0780-toscarequirements.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0780-toscarequirements.sql
new file mode 100644
index 00000000..02af777b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0780-toscarequirements.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarequirements;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0790-toscarequirements_toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0790-toscarequirements_toscarequirement.sql
new file mode 100644
index 00000000..2680d447
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0790-toscarequirements_toscarequirement.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscarequirements_toscarequirement;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0800-toscaservicetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0800-toscaservicetemplate.sql
new file mode 100644
index 00000000..4ab34491
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0800-toscaservicetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscaservicetemplate;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0810-toscatopologytemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0810-toscatopologytemplate.sql
new file mode 100644
index 00000000..82f38618
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0810-toscatopologytemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscatopologytemplate;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0820-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0820-toscatrigger.sql
new file mode 100644
index 00000000..d9af7cb8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0820-toscatrigger.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscatrigger;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql
new file mode 100644
index 00000000..f1810488
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql
@@ -0,0 +1,20 @@
+ /*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaNodeTemplate_capabilitiesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql
new file mode 100644
index 00000000..659400e5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaNodeTemplate_requirementsName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0850-FK_ToscaNodeType_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0850-FK_ToscaNodeType_requirementsName.sql
new file mode 100644
index 00000000..96cdd543
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0850-FK_ToscaNodeType_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaNodeType_requirementsName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql
new file mode 100644
index 00000000..0cf68728
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaServiceTemplate_capabilityTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql
new file mode 100644
index 00000000..13a32b57
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaServiceTemplate_dataTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql
new file mode 100644
index 00000000..fb18805c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaServiceTemplate_nodeTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql
new file mode 100644
index 00000000..ae6cad90
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaServiceTemplate_policyTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql
new file mode 100644
index 00000000..ca86eacb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaServiceTemplate_relationshipTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
new file mode 100644
index 00000000..f1035bb3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaTopologyTemplate_nodeTemplatesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0920-FK_ToscaTopologyTemplate_policyName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0920-FK_ToscaTopologyTemplate_policyName.sql
new file mode 100644
index 00000000..04392ede
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0920-FK_ToscaTopologyTemplate_policyName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS FK_ToscaTopologyTemplate_policyName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0940-PdpPolicyStatus_PdpGroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0940-PdpPolicyStatus_PdpGroup.sql
new file mode 100644
index 00000000..99a9d067
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0940-PdpPolicyStatus_PdpGroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS PdpPolicyStatus_PdpGroup;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql
new file mode 100644
index 00000000..17606302
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS TscaServiceTemplatetopologyTemplateParentLocalName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql
new file mode 100644
index 00000000..4dccc452
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetemplate DROP CONSTRAINT IF EXISTS FK_ToscaNodeTemplate_capabilitiesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql
new file mode 100644
index 00000000..a079be09
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetemplate DROP CONSTRAINT IF EXISTS FK_ToscaNodeTemplate_requirementsName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0980-FK_ToscaNodeType_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0980-FK_ToscaNodeType_requirementsName.sql
new file mode 100644
index 00000000..59f43c02
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0980-FK_ToscaNodeType_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetype DROP CONSTRAINT IF EXISTS FK_ToscaNodeType_requirementsName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql
new file mode 100644
index 00000000..1372b622
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS FK_ToscaServiceTemplate_capabilityTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql
new file mode 100644
index 00000000..84d9aa3b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS FK_ToscaServiceTemplate_dataTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql
new file mode 100644
index 00000000..0bafbb5d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS FK_ToscaServiceTemplate_nodeTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql
new file mode 100644
index 00000000..3ab89248
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS FK_ToscaServiceTemplate_policyTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql
new file mode 100644
index 00000000..01595abf
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS FK_ToscaServiceTemplate_relationshipTypesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
new file mode 100644
index 00000000..e96f0a45
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscatopologytemplate DROP CONSTRAINT IF EXISTS FK_ToscaTopologyTemplate_nodeTemplatesName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1050-FK_ToscaTopologyTemplate_policyName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1050-FK_ToscaTopologyTemplate_policyName.sql
new file mode 100644
index 00000000..07b6bb18
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1050-FK_ToscaTopologyTemplate_policyName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscatopologytemplate DROP CONSTRAINT IF EXISTS FK_ToscaTopologyTemplate_policyName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql
new file mode 100644
index 00000000..de620a43
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/downgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate DROP CONSTRAINT IF EXISTS TscaServiceTemplatetopologyTemplateParentLocalName;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0100-jpapdpgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0100-jpapdpgroup_properties.sql
new file mode 100644
index 00000000..0dbc46b0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0100-jpapdpgroup_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0110-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0110-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..0f0382ea
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0110-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpapdpstatistics_enginestats (AVERAGEEXECUTIONTIME DOUBLE PRECISION 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 TIMESTAMP DEFAULT NULL NULL, name VARCHAR(120) NULL, version VARCHAR(20) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0120-jpapdpsubgroup_policies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0120-jpapdpsubgroup_policies.sql
new file mode 100644
index 00000000..6ceb2390
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0120-jpapdpsubgroup_policies.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0130-jpapdpsubgroup_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0130-jpapdpsubgroup_properties.sql
new file mode 100644
index 00000000..be7c4feb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0130-jpapdpsubgroup_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
new file mode 100644
index 00000000..c645acd5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0140-jpapdpsubgroup_supportedpolicytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql
new file mode 100644
index 00000000..18c2e2f7
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0150-jpatoscacapabilityassignment_attributes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_attributes (name VARCHAR(120) NULL, version VARCHAR(20) NULL, ATTRIBUTES TEXT NULL, ATTRIBUTES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0160-jpatoscacapabilityassignment_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0160-jpatoscacapabilityassignment_metadata.sql
new file mode 100644
index 00000000..60ac9696
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0160-jpatoscacapabilityassignment_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql
new file mode 100644
index 00000000..479b0a65
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0170-jpatoscacapabilityassignment_occurrences.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0180-jpatoscacapabilityassignment_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0180-jpatoscacapabilityassignment_properties.sql
new file mode 100644
index 00000000..a0bfae52
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0180-jpatoscacapabilityassignment_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilityassignment_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES TEXT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0190-jpatoscacapabilitytype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0190-jpatoscacapabilitytype_metadata.sql
new file mode 100644
index 00000000..eea09fee
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0190-jpatoscacapabilitytype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql
new file mode 100644
index 00000000..4720a4bf
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0200-jpatoscacapabilitytype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscacapabilitytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES BYTEA DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0210-jpatoscadatatype_constraints.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0210-jpatoscadatatype_constraints.sql
new file mode 100644
index 00000000..2b11a0d3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0210-jpatoscadatatype_constraints.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscadatatype_constraints (name VARCHAR(120) NULL, version VARCHAR(20) NULL, CONSTRAINTS VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0220-jpatoscadatatype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0220-jpatoscadatatype_metadata.sql
new file mode 100644
index 00000000..0e1b5363
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0220-jpatoscadatatype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscadatatype_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0230-jpatoscadatatype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0230-jpatoscadatatype_properties.sql
new file mode 100644
index 00000000..2268779e
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0230-jpatoscadatatype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscadatatype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES BYTEA DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0240-jpatoscanodetemplate_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0240-jpatoscanodetemplate_metadata.sql
new file mode 100644
index 00000000..01b348cc
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0240-jpatoscanodetemplate_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscanodetemplate_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0250-jpatoscanodetemplate_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0250-jpatoscanodetemplate_properties.sql
new file mode 100644
index 00000000..ee118cde
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0250-jpatoscanodetemplate_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscanodetemplate_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES TEXT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0260-jpatoscanodetype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0260-jpatoscanodetype_metadata.sql
new file mode 100644
index 00000000..ae8b5925
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0260-jpatoscanodetype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscanodetype_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0270-jpatoscanodetype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0270-jpatoscanodetype_properties.sql
new file mode 100644
index 00000000..a48e3aa3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0270-jpatoscanodetype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscanodetype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES BYTEA DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0280-jpatoscapolicy_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0280-jpatoscapolicy_metadata.sql
new file mode 100644
index 00000000..f62dc93f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0280-jpatoscapolicy_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicy_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0290-jpatoscapolicy_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0290-jpatoscapolicy_properties.sql
new file mode 100644
index 00000000..482297a2
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0290-jpatoscapolicy_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicy_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES TEXT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0300-jpatoscapolicy_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0300-jpatoscapolicy_targets.sql
new file mode 100644
index 00000000..89d27525
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0300-jpatoscapolicy_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicy_targets (name VARCHAR(120) NULL, version VARCHAR(20) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0310-jpatoscapolicytype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0310-jpatoscapolicytype_metadata.sql
new file mode 100644
index 00000000..03ef5938
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0310-jpatoscapolicytype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicytype_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0320-jpatoscapolicytype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0320-jpatoscapolicytype_properties.sql
new file mode 100644
index 00000000..32fbde5c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0320-jpatoscapolicytype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicytype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES BYTEA DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0330-jpatoscapolicytype_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0330-jpatoscapolicytype_targets.sql
new file mode 100644
index 00000000..e01cbc18
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0330-jpatoscapolicytype_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicytype_targets (name VARCHAR(120) NULL, version VARCHAR(20) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0340-jpatoscapolicytype_triggers.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0340-jpatoscapolicytype_triggers.sql
new file mode 100644
index 00000000..fb738c03
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0340-jpatoscapolicytype_triggers.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscapolicytype_triggers (name VARCHAR(120) NULL, version VARCHAR(20) NULL, TRIGGERS VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0350-jpatoscaproperty_constraints.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0350-jpatoscaproperty_constraints.sql
new file mode 100644
index 00000000..6fbf4df0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0350-jpatoscaproperty_constraints.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0360-jpatoscaproperty_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0360-jpatoscaproperty_metadata.sql
new file mode 100644
index 00000000..a72a16a1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0360-jpatoscaproperty_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+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);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0370-jpatoscarelationshiptype_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0370-jpatoscarelationshiptype_metadata.sql
new file mode 100644
index 00000000..d170ea28
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0370-jpatoscarelationshiptype_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql
new file mode 100644
index 00000000..e4ac7384
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0380-jpatoscarelationshiptype_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscarelationshiptype_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES BYTEA DEFAULT NULL NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0390-jpatoscarequirement_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0390-jpatoscarequirement_metadata.sql
new file mode 100644
index 00000000..611aecb0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0390-jpatoscarequirement_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscarequirement_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0400-jpatoscarequirement_occurrences.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0400-jpatoscarequirement_occurrences.sql
new file mode 100644
index 00000000..945c4cd4
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0400-jpatoscarequirement_occurrences.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscarequirement_occurrences (name VARCHAR(120) NULL, version VARCHAR(20) NULL, OCCURRENCES INT DEFAULT NULL NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0410-jpatoscarequirement_properties.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0410-jpatoscarequirement_properties.sql
new file mode 100644
index 00000000..a705a941
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0410-jpatoscarequirement_properties.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscarequirement_properties (name VARCHAR(120) NULL, version VARCHAR(20) NULL, PROPERTIES TEXT NULL, PROPERTIES_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0420-jpatoscaservicetemplate_metadata.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0420-jpatoscaservicetemplate_metadata.sql
new file mode 100644
index 00000000..ea13b6ac
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0420-jpatoscaservicetemplate_metadata.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpatoscaservicetemplate_metadata (name VARCHAR(120) NULL, version VARCHAR(20) NULL, METADATA VARCHAR(255) NULL, METADATA_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql
new file mode 100644
index 00000000..856265a6
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0430-jpatoscatopologytemplate_inputs.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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 BYTEA DEFAULT NULL NULL, INPUTS_KEY VARCHAR(255) NULL);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql
new file mode 100644
index 00000000..102f68f1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0440-pdpgroup_pdpsubgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0450-pdpgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0450-pdpgroup.sql
new file mode 100644
index 00000000..ac04634f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0450-pdpgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0460-pdppolicystatus.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0460-pdppolicystatus.sql
new file mode 100644
index 00000000..d2a43b53
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0460-pdppolicystatus.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS pdppolicystatus (DEPLOY BIT DEFAULT 0::bit 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0470-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0470-pdp.sql
new file mode 100644
index 00000000..e6c885ed
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0470-pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0480-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0480-pdpstatistics.sql
new file mode 100644
index 00000000..80dc40fa
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0480-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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 TIMESTAMP NOT NULL, name VARCHAR(120) NOT NULL, version VARCHAR(20) NOT NULL, CONSTRAINT PK_PDPSTATISTICS PRIMARY KEY (timeStamp, name, version));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0490-pdpsubgroup_pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0490-pdpsubgroup_pdp.sql
new file mode 100644
index 00000000..01c9bfa6
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0490-pdpsubgroup_pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0500-pdpsubgroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0500-pdpsubgroup.sql
new file mode 100644
index 00000000..94779ff5
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0500-pdpsubgroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0510-toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0510-toscacapabilityassignment.sql
new file mode 100644
index 00000000..d7d91c2d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0510-toscacapabilityassignment.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0520-toscacapabilityassignments.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0520-toscacapabilityassignments.sql
new file mode 100644
index 00000000..f4d83199
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0520-toscacapabilityassignments.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
new file mode 100644
index 00000000..90f849af
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0530-toscacapabilityassignments_toscacapabilityassignment.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0540-toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0540-toscacapabilitytype.sql
new file mode 100644
index 00000000..4e7d2b7e
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0540-toscacapabilitytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0550-toscacapabilitytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0550-toscacapabilitytypes.sql
new file mode 100644
index 00000000..886a1fcb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0550-toscacapabilitytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
new file mode 100644
index 00000000..496c2679
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0560-toscacapabilitytypes_toscacapabilitytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0570-toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0570-toscadatatype.sql
new file mode 100644
index 00000000..507c076d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0570-toscadatatype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0580-toscadatatypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0580-toscadatatypes.sql
new file mode 100644
index 00000000..26dcd4d0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0580-toscadatatypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0590-toscadatatypes_toscadatatype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0590-toscadatatypes_toscadatatype.sql
new file mode 100644
index 00000000..c3461792
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0590-toscadatatypes_toscadatatype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0600-toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0600-toscanodetemplate.sql
new file mode 100644
index 00000000..ddd720bd
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0600-toscanodetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0610-toscanodetemplates.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0610-toscanodetemplates.sql
new file mode 100644
index 00000000..443ae7f6
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0610-toscanodetemplates.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql
new file mode 100644
index 00000000..e21d174c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0620-toscanodetemplates_toscanodetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0630-toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0630-toscanodetype.sql
new file mode 100644
index 00000000..350b377b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0630-toscanodetype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0640-toscanodetypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0640-toscanodetypes.sql
new file mode 100644
index 00000000..35d7193a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0640-toscanodetypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0650-toscanodetypes_toscanodetype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0650-toscanodetypes_toscanodetype.sql
new file mode 100644
index 00000000..3ab18505
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0650-toscanodetypes_toscanodetype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0660-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0660-toscaparameter.sql
new file mode 100644
index 00000000..957573f0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0660-toscaparameter.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0670-toscapolicies.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0670-toscapolicies.sql
new file mode 100644
index 00000000..a6ff2eb8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0670-toscapolicies.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0680-toscapolicies_toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0680-toscapolicies_toscapolicy.sql
new file mode 100644
index 00000000..cdad489b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0680-toscapolicies_toscapolicy.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0690-toscapolicy.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0690-toscapolicy.sql
new file mode 100644
index 00000000..89d34081
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0690-toscapolicy.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0700-toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0700-toscapolicytype.sql
new file mode 100644
index 00000000..efafcb04
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0700-toscapolicytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0710-toscapolicytypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0710-toscapolicytypes.sql
new file mode 100644
index 00000000..7831adc2
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0710-toscapolicytypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql
new file mode 100644
index 00000000..01f09ebc
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0720-toscapolicytypes_toscapolicytype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0730-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0730-toscaproperty.sql
new file mode 100644
index 00000000..6b77adf9
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0730-toscaproperty.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS toscaproperty (DEFAULTVALUE VARCHAR(255) NULL, DESCRIPTION VARCHAR(255) NULL, ENTRYSCHEMA BYTEA DEFAULT NULL NULL, REQUIRED BIT DEFAULT 0::bit 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0740-toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0740-toscarelationshiptype.sql
new file mode 100644
index 00000000..b2cf5641
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0740-toscarelationshiptype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0750-toscarelationshiptypes.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0750-toscarelationshiptypes.sql
new file mode 100644
index 00000000..b297680d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0750-toscarelationshiptypes.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
new file mode 100644
index 00000000..9882644c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0760-toscarelationshiptypes_toscarelationshiptype.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0770-toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0770-toscarequirement.sql
new file mode 100644
index 00000000..a225e0a9
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0770-toscarequirement.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0780-toscarequirements.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0780-toscarequirements.sql
new file mode 100644
index 00000000..2e9aaa9c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0780-toscarequirements.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0790-toscarequirements_toscarequirement.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0790-toscarequirements_toscarequirement.sql
new file mode 100644
index 00000000..25fe80df
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0790-toscarequirements_toscarequirement.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0800-toscaservicetemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0800-toscaservicetemplate.sql
new file mode 100644
index 00000000..26fce54f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0800-toscaservicetemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0810-toscatopologytemplate.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0810-toscatopologytemplate.sql
new file mode 100644
index 00000000..dd97db0b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0810-toscatopologytemplate.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0820-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0820-toscatrigger.sql
new file mode 100644
index 00000000..0270f079
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0820-toscatrigger.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition BYTEA DEFAULT NULL NULL, toscaConstraint BYTEA DEFAULT NULL NULL, DESCRIPTION VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, PERIOD BYTEA DEFAULT NULL NULL, SCHEDULE BYTEA DEFAULT NULL NULL, TARGETFILTER BYTEA 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql
new file mode 100644
index 00000000..8d798b69
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0830-FK_ToscaNodeTemplate_capabilitiesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaNodeTemplate_capabilitiesName ON toscanodetemplate(capabilitiesName, capabilitiesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql
new file mode 100644
index 00000000..380fb110
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0840-FK_ToscaNodeTemplate_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaNodeTemplate_requirementsName ON toscanodetemplate(requirementsName, requirementsVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0850-FK_ToscaNodeType_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0850-FK_ToscaNodeType_requirementsName.sql
new file mode 100644
index 00000000..1ee32de8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0850-FK_ToscaNodeType_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaNodeType_requirementsName ON toscanodetype(requirementsName, requirementsVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql
new file mode 100644
index 00000000..97359416
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0860-FK_ToscaServiceTemplate_capabilityTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaServiceTemplate_capabilityTypesName ON toscaservicetemplate(capabilityTypesName, capabilityTypesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql
new file mode 100644
index 00000000..9fbe5a65
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0870-FK_ToscaServiceTemplate_dataTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaServiceTemplate_dataTypesName ON toscaservicetemplate(dataTypesName, dataTypesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql
new file mode 100644
index 00000000..c7a308bc
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0880-FK_ToscaServiceTemplate_nodeTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaServiceTemplate_nodeTypesName ON toscaservicetemplate(nodeTypesName, nodeTypesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql
new file mode 100644
index 00000000..a83d679b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0890-FK_ToscaServiceTemplate_policyTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaServiceTemplate_policyTypesName ON toscaservicetemplate(policyTypesName, policyTypesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql
new file mode 100644
index 00000000..b13649ec
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0900-FK_ToscaServiceTemplate_relationshipTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaServiceTemplate_relationshipTypesName ON toscaservicetemplate(relationshipTypesName, relationshipTypesVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
new file mode 100644
index 00000000..64fe698c
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0910-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaTopologyTemplate_nodeTemplatesName ON toscatopologytemplate(nodeTemplatesName, nodeTemplatessVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0920-FK_ToscaTopologyTemplate_policyName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0920-FK_ToscaTopologyTemplate_policyName.sql
new file mode 100644
index 00000000..eda269e1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0920-FK_ToscaTopologyTemplate_policyName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX FK_ToscaTopologyTemplate_policyName ON toscatopologytemplate(policyName, policyVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0940-PdpPolicyStatus_PdpGroup.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0940-PdpPolicyStatus_PdpGroup.sql
new file mode 100644
index 00000000..0d37625f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0940-PdpPolicyStatus_PdpGroup.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX PdpPolicyStatus_PdpGroup ON pdppolicystatus(PDPGROUP);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql
new file mode 100644
index 00000000..bcbc4edb
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0950-TscaServiceTemplatetopologyTemplateParentLocalName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX TscaServiceTemplatetopologyTemplateParentLocalName ON toscaservicetemplate(topologyTemplateParentLocalName, topologyTemplateLocalName, topologyTemplateParentKeyVersion, topologyTemplateParentKeyName);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql
new file mode 100644
index 00000000..23c164fd
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0960-FK_ToscaNodeTemplate_capabilitiesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetemplate ADD CONSTRAINT FK_ToscaNodeTemplate_capabilitiesName FOREIGN KEY (capabilitiesName, capabilitiesVersion) REFERENCES toscacapabilityassignments (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql
new file mode 100644
index 00000000..15d40198
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0970-FK_ToscaNodeTemplate_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetemplate ADD CONSTRAINT FK_ToscaNodeTemplate_requirementsName FOREIGN KEY (requirementsName, requirementsVersion) REFERENCES toscarequirements (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0980-FK_ToscaNodeType_requirementsName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0980-FK_ToscaNodeType_requirementsName.sql
new file mode 100644
index 00000000..0fb2b677
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0980-FK_ToscaNodeType_requirementsName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscanodetype ADD CONSTRAINT FK_ToscaNodeType_requirementsName FOREIGN KEY (requirementsName, requirementsVersion) REFERENCES toscarequirements (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql
new file mode 100644
index 00000000..e6e2b1b3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/0990-FK_ToscaServiceTemplate_capabilityTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT FK_ToscaServiceTemplate_capabilityTypesName FOREIGN KEY (capabilityTypesName, capabilityTypesVersion) REFERENCES toscacapabilitytypes (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql
new file mode 100644
index 00000000..be86fd68
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1000-FK_ToscaServiceTemplate_dataTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT FK_ToscaServiceTemplate_dataTypesName FOREIGN KEY (dataTypesName, dataTypesVersion) REFERENCES toscadatatypes (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql
new file mode 100644
index 00000000..fb31ff4f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1010-FK_ToscaServiceTemplate_nodeTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT FK_ToscaServiceTemplate_nodeTypesName FOREIGN KEY (nodeTypesName, nodeTypesVersion) REFERENCES toscanodetypes (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql
new file mode 100644
index 00000000..da0b56b2
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1020-FK_ToscaServiceTemplate_policyTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT FK_ToscaServiceTemplate_policyTypesName FOREIGN KEY (policyTypesName, policyTypesVersion) REFERENCES toscapolicytypes (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql
new file mode 100644
index 00000000..4ee1e90f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1030-FK_ToscaServiceTemplate_relationshipTypesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT FK_ToscaServiceTemplate_relationshipTypesName FOREIGN KEY (relationshipTypesName, relationshipTypesVersion) REFERENCES toscarelationshiptypes (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
new file mode 100644
index 00000000..f049e071
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1040-FK_ToscaTopologyTemplate_nodeTemplatesName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscatopologytemplate ADD CONSTRAINT FK_ToscaTopologyTemplate_nodeTemplatesName FOREIGN KEY (nodeTemplatesName, nodeTemplatessVersion) REFERENCES toscanodetemplates (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1050-FK_ToscaTopologyTemplate_policyName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1050-FK_ToscaTopologyTemplate_policyName.sql
new file mode 100644
index 00000000..34a26541
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1050-FK_ToscaTopologyTemplate_policyName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscatopologytemplate ADD CONSTRAINT FK_ToscaTopologyTemplate_policyName FOREIGN KEY (policyName, policyVersion) REFERENCES toscapolicies (name, version) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql
new file mode 100644
index 00000000..06621658
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0800/upgrade/1060-TscaServiceTemplatetopologyTemplateParentLocalName.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE toscaservicetemplate ADD CONSTRAINT TscaServiceTemplatetopologyTemplateParentLocalName FOREIGN KEY (topologyTemplateParentLocalName, topologyTemplateLocalName, topologyTemplateParentKeyVersion, topologyTemplateParentKeyName) REFERENCES toscatopologytemplate (parentLocalName, localName, parentKeyVersion, parentKeyName) ON UPDATE RESTRICT ON DELETE RESTRICT;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0100-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0100-pdp.sql
new file mode 100644
index 00000000..fbc9c47d
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0100-pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdp DROP COLUMN LASTUPDATE;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0110-idx_tsidx1.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0110-idx_tsidx1.sql
new file mode 100644
index 00000000..4df00a1b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0110-idx_tsidx1.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IDX_TSIDX1;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0120-pk_pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0120-pk_pdpstatistics.sql
new file mode 100644
index 00000000..65425348
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0120-pk_pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics ADD CONSTRAINT PK_PDPSTATISTICS PRIMARY KEY (timeStamp, name, version);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0130-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0130-pdpstatistics.sql
new file mode 100644
index 00000000..a8d021ff
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0130-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics DROP COLUMN POLICYUNDEPLOYCOUNT, DROP COLUMN POLICYUNDEPLOYFAILCOUNT, DROP COLUMN POLICYUNDEPLOYSUCCESSCOUNT, DROP COLUMN ID;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0140-pk_pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0140-pk_pdpstatistics.sql
new file mode 100644
index 00000000..6b87eef3
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0140-pk_pdpstatistics.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics DROP CONSTRAINT PRIMARY KEY;
+
+UPDATE pdpstatistics set ID = 0;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0150-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0150-pdpstatistics.sql
new file mode 100644
index 00000000..17c4e6a8
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0150-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics ALTER COLUMN timeStamp TYPE TIMESTAMP(6);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0160-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0160-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..b2bdb432
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0160-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpapdpstatistics_enginestats DROP COLUMN ID;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0170-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0170-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..8a33f691
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0170-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+UPDATE jpapdpstatistics_enginestats AS a
+SET timeStamp=b.timeStamp
+FROM pdpstatistics AS b
+WHERE a.name=b.name AND a.version=b.version AND a.id=b.id;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0180-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0180-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..114467bf
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0180-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp TIMESTAMP(6) DEFAULT NULL NULL;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0190-jpapolicyaudit.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0190-jpapolicyaudit.sql
new file mode 100644
index 00000000..3a6176f4
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0190-jpapolicyaudit.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpapolicyaudit;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0200-JpaPolicyAuditIndex_timestamp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0200-JpaPolicyAuditIndex_timestamp.sql
new file mode 100644
index 00000000..284ca0c1
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0200-JpaPolicyAuditIndex_timestamp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP INDEX IF EXISTS JpaPolicyAuditIndex_timestamp;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0210-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0210-sequence.sql
new file mode 100644
index 00000000..43043485
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0210-sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0220-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0220-sequence.sql
new file mode 100644
index 00000000..f2724415
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/downgrade/0220-sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DELETE from sequence;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0100-pdp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0100-pdp.sql
new file mode 100644
index 00000000..7c923d3e
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0100-pdp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdp ADD COLUMN LASTUPDATE TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0110-idx_tsidx1.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0110-idx_tsidx1.sql
new file mode 100644
index 00000000..0becab72
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0110-idx_tsidx1.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX IDX_TSIDX1 ON pdpstatistics(timeStamp, name, version);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0120-pk_pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0120-pk_pdpstatistics.sql
new file mode 100644
index 00000000..c6d8d8ed
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0120-pk_pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics DROP CONSTRAINT pk_pdpstatistics;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0130-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0130-pdpstatistics.sql
new file mode 100644
index 00000000..611a7b9b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0130-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN POLICYUNDEPLOYFAILCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN POLICYUNDEPLOYSUCCESSCOUNT BIGINT DEFAULT NULL NULL, ADD COLUMN ID BIGINT NOT NULL;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0140-pk_pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0140-pk_pdpstatistics.sql
new file mode 100644
index 00000000..86fe9779
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0140-pk_pdpstatistics.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+UPDATE pdpstatistics as p SET id=t.row_num FROM (SELECT name, version, timeStamp, ROW_NUMBER() OVER (ORDER BY timeStamp ASC) AS row_num FROM pdpstatistics GROUP BY name, version, timeStamp) AS t WHERE p.name=t.name AND p.version=t.version AND p.timeStamp=t.timeStamp;
+
+ALTER TABLE pdpstatistics ADD CONSTRAINT PK_PDPSTATISTICS PRIMARY KEY (ID, name, version);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0150-pdpstatistics.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0150-pdpstatistics.sql
new file mode 100644
index 00000000..5cf66cf2
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0150-pdpstatistics.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE pdpstatistics ALTER COLUMN timeStamp TIMESTAMP(6);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0160-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0160-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..9ca423fd
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0160-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN ID BIGINT DEFAULT NULL NULL;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0170-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0170-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..cbd5aa30
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0170-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+UPDATE jpapdpstatistics_enginestats AS a
+SET id = b.id
+FROM pdpstatistics AS b
+WHERE a.name = b.name AND a.version = b.version AND a.timeStamp = b.timeStamp;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0180-jpapdpstatistics_enginestats.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0180-jpapdpstatistics_enginestats.sql
new file mode 100644
index 00000000..f1041131
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0180-jpapdpstatistics_enginestats.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpapdpstatistics_enginestats DROP COLUMN timeStamp;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0190-jpapolicyaudit.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0190-jpapolicyaudit.sql
new file mode 100644
index 00000000..319ea004
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0190-jpapolicyaudit.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS jpapolicyaudit (ACTION INT DEFAULT NULL NULL, PDPGROUP VARCHAR(255) NULL, PDPTYPE VARCHAR(255) NULL, TIMESTAMP TIMESTAMP 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0200-JpaPolicyAuditIndex_timestamp.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0200-JpaPolicyAuditIndex_timestamp.sql
new file mode 100644
index 00000000..d789d118
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0200-JpaPolicyAuditIndex_timestamp.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE INDEX JpaPolicyAuditIndex_timestamp ON jpapolicyaudit(TIMESTAMP);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0210-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0210-sequence.sql
new file mode 100644
index 00000000..64d6f01b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0210-sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0220-sequence.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0220-sequence.sql
new file mode 100644
index 00000000..9c02d144
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/0900/upgrade/0220-sequence.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+INSERT INTO sequence(SEQ_NAME, SEQ_COUNT) VALUES('SEQ_GEN', (SELECT COALESCE(max(id),0) FROM pdpstatistics));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0100-jpatoscapolicy_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0100-jpatoscapolicy_targets.sql
new file mode 100644
index 00000000..49172830
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0100-jpatoscapolicy_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicy_targets DROP COLUMN toscaPolicyName, DROP COLUMN toscaPolicyVersion;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0110-jpatoscapolicytype_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0110-jpatoscapolicytype_targets.sql
new file mode 100644
index 00000000..09b49bb2
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0110-jpatoscapolicytype_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicytype_targets DROP COLUMN toscaPolicyTypeName, DROP COLUMN toscaPolicyTypeVersion;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0120-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0120-toscatrigger.sql
new file mode 100644
index 00000000..b1764ea0
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0120-toscatrigger.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+CREATE TABLE IF NOT EXISTS toscatrigger (ACTION VARCHAR(255) NULL, toscaCondition BYTEA DEFAULT NULL NULL, toscaConstraint BYTEA DEFAULT NULL NULL, DESCRIPTION VARCHAR(255) NULL, EVALUATIONS INT DEFAULT NULL NULL, EVENTTYPE VARCHAR(255) NULL, METHOD VARCHAR(255) NULL, PERIOD BYTEA DEFAULT NULL NULL, SCHEDULE BYTEA DEFAULT NULL NULL, TARGETFILTER BYTEA 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0130-jpatoscapolicytype_triggers.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0130-jpatoscapolicytype_triggers.sql
new file mode 100644
index 00000000..16207f26
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0130-jpatoscapolicytype_triggers.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicytype_triggers ALTER COLUMN triggers TYPE VARCHAR(255);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0140-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0140-toscaparameter.sql
new file mode 100644
index 00000000..7ab89c19
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0140-toscaparameter.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0150-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0150-toscaproperty.sql
new file mode 100644
index 00000000..e1abf28f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/downgrade/0150-toscaproperty.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+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 BYTEA 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));
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0100-jpatoscapolicy_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0100-jpatoscapolicy_targets.sql
new file mode 100644
index 00000000..5a338d6f
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0100-jpatoscapolicy_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicy_targets ADD COLUMN toscaPolicyName VARCHAR(120) NOT NULL, ADD COLUMN toscaPolicyVersion VARCHAR(20) NOT NULL, ADD CONSTRAINT PK_JPATOSCAPOLICY_TARGETS PRIMARY KEY (toscaPolicyName, toscaPolicyVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0110-jpatoscapolicytype_targets.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0110-jpatoscapolicytype_targets.sql
new file mode 100644
index 00000000..6ded7259
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0110-jpatoscapolicytype_targets.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicytype_targets ADD COLUMN toscaPolicyTypeName VARCHAR(120) NOT NULL, ADD COLUMN toscaPolicyTypeVersion VARCHAR(20) NOT NULL, ADD CONSTRAINT PK_JPATOSCAPOLICYTYPE_TARGETS PRIMARY KEY (toscaPolicyTypeName, toscaPolicyTypeVersion);
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0120-toscatrigger.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0120-toscatrigger.sql
new file mode 100644
index 00000000..6fc5e99b
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0120-toscatrigger.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscatrigger;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0130-jpatoscapolicytype_triggers.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0130-jpatoscapolicytype_triggers.sql
new file mode 100644
index 00000000..a8d4a552
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0130-jpatoscapolicytype_triggers.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0;the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+ALTER TABLE jpatoscapolicytype_triggers ALTER COLUMN triggers TYPE BYTEA USING triggers::bytea;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0140-toscaparameter.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0140-toscaparameter.sql
new file mode 100644
index 00000000..ac03efb4
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0140-toscaparameter.sql
@@ -0,0 +1,20 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS toscaparameter;
diff --git a/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0150-toscaproperty.sql b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0150-toscaproperty.sql
new file mode 100644
index 00000000..c482243a
--- /dev/null
+++ b/policy-db-migrator/src/main/docker/config/policyadmin/postgres/1000/upgrade/0150-toscaproperty.sql
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+DROP TABLE IF EXISTS jpatoscaproperty_constraints;
+DROP TABLE IF EXISTS jpatoscaproperty_metadata;
+DROP TABLE IF EXISTS toscaproperty;