From 01ebe9ae8c68687b1eea6729af6e23d0e0b484df Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Tue, 26 Nov 2019 12:07:31 -0500 Subject: [PATCH] Revert "fix test" This reverts commit 3b35724b --- .../ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java | 8 ++------ .../ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java | 5 ----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java index 0c5207ab246..95d82fa305a 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseFlywayMigrateDatabaseCommand.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.cli; import ca.uhn.fhir.jpa.migrate.DriverTypeEnum; import ca.uhn.fhir.jpa.migrate.FlywayMigrator; +import ca.uhn.fhir.jpa.migrate.SchemaMigrator; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; @@ -40,11 +41,6 @@ public abstract class BaseFlywayMigrateDatabaseCommand extends B public static final String MIGRATE_DATABASE = "migrate-database"; private Set myFlags; - private final String myMigrationTablename; - - protected BaseFlywayMigrateDatabaseCommand(String theMigrationTablename) { - myMigrationTablename = theMigrationTablename; - } protected Set getFlags() { return myFlags; @@ -114,7 +110,7 @@ public abstract class BaseFlywayMigrateDatabaseCommand extends B .filter(StringUtils::isNotBlank) .collect(Collectors.toSet()); - FlywayMigrator migrator = new FlywayMigrator(myMigrationTablename); + FlywayMigrator migrator = new FlywayMigrator(SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME); migrator.setConnectionUrl(url); migrator.setDriverType(driverType); migrator.setUsername(username); diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java index 15485fceed5..9de06be32eb 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/HapiFlywayMigrateDatabaseCommand.java @@ -21,7 +21,6 @@ package ca.uhn.fhir.cli; */ import ca.uhn.fhir.jpa.migrate.FlywayMigrator; -import ca.uhn.fhir.jpa.migrate.SchemaMigrator; import ca.uhn.fhir.jpa.migrate.taskdef.BaseTask; import ca.uhn.fhir.jpa.migrate.tasks.HapiFhirJpaMigrationTasks; import ca.uhn.fhir.util.VersionEnum; @@ -31,10 +30,6 @@ import java.util.List; public class HapiFlywayMigrateDatabaseCommand extends BaseFlywayMigrateDatabaseCommand { - public HapiFlywayMigrateDatabaseCommand() { - super(SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME); - } - @Override protected List provideAllowedVersions() { return Arrays.asList(VersionEnum.values());