From: Alexis de Talhouët Date: Mon, 12 Nov 2018 21:35:30 +0000 (-0500) Subject: Drop CDS tables only if they exist X-Git-Tag: 1.4.3~11^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=sdnc%2Foam.git;a=commitdiff_plain;h=c9c33c13768f0c4c39bb9831353cbe97b519a949 Drop CDS tables only if they exist During the initialization of SDNC, SDNC tries to install all the SQL dump provided. While processing the one for CDS, it was failing to execute the first statement as the table is not existent; hence was exiting that dump and processing with the next one. In order to make sure the process creates CDS tables, make the DROP statement work even if table doesn't exist. Change-Id: Ifa99b8e1a13ac3828828e8b2a9f9674556f84ced Issue-ID: CCSDK-682 Signed-off-by: Alexis de Talhouët Former-commit-id: 2f69e233c4143fb6bf5939bf4db26ea76805c933 --- diff --git a/installation/sdnc/src/main/resources/blueprint-processor.data.dump b/installation/sdnc/src/main/resources/blueprint-processor.data.dump index 5fd53cbd..9a19863c 100644 --- a/installation/sdnc/src/main/resources/blueprint-processor.data.dump +++ b/installation/sdnc/src/main/resources/blueprint-processor.data.dump @@ -4,10 +4,10 @@ SET FOREIGN_KEY_CHECKS=0; -DROP TABLE sdnctl.CONFIG_RESOURCE_ASSIGNMENT_DATA; -DROP TABLE sdnctl.CONFIG_RESOURCE; -DROP TABLE sdnctl.CONFIG_RESOURCE_RELATION; -DROP TABLE sdnctl.CONFIG_TRANSACTION_LOG; +DROP TABLE IF EXISTS sdnctl.CONFIG_RESOURCE_ASSIGNMENT_DATA; +DROP TABLE IF EXISTS sdnctl.CONFIG_RESOURCE; +DROP TABLE IF EXISTS sdnctl.CONFIG_RESOURCE_RELATION; +DROP TABLE IF EXISTS sdnctl.CONFIG_TRANSACTION_LOG; SET FOREIGN_KEY_CHECKS=1;