From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml | 2 +- .../src/main/java/org/openecomp/core/migration/MigrationMain.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'openecomp-be/tools/migration') diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml b/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml index 7bc93bddab..1f281c950b 100644 --- a/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml +++ b/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml @@ -47,7 +47,7 @@ com.amdocs.zusammen.plugin zusammen-state-store-cassandra-plugin - 0.0.1-SNAPSHOT + 0.0.1 org.hibernate diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java index 283c9cf25d..c43cf32001 100644 --- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java +++ b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java @@ -78,7 +78,7 @@ public class MigrationMain { printMessage(logger, "Checking whether a migration has already been run."); if (MigrationMarker.isMigrated()) { printMessage(logger, "The DB has already been migrated, this script will now exit."); - return; + System.exit(status); } ItemCassandraDao itemCassandraDao = new ItemCassandraDao(); VersionCassandraDao versionCassandraDao = new VersionCassandraDao(); @@ -243,7 +243,8 @@ public class MigrationMain { new OrchestrationTemplateCandidateCassandraLoader(); orchestrationTemplateCandidateCassandraLoader.list().stream() - .filter(entity -> needMigration(entity.getId(), entity.getVersion())) + .filter(entity -> needMigration(entity.getId(), entity.getVersion()) && + entity.getContentData()!=null && entity.getFilesDataStructure()!=null) .forEach(entity -> ElementHandler .save(context, cassandraElementRepository, entity.getId(), entity.getVersion(), OrchestrationTemplateCandidateConvertor -- cgit 1.2.3-korg