parent
3b35724bdd
commit
01ebe9ae8c
|
@ -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<T extends Enum> extends B
|
|||
|
||||
public static final String MIGRATE_DATABASE = "migrate-database";
|
||||
private Set<String> myFlags;
|
||||
private final String myMigrationTablename;
|
||||
|
||||
protected BaseFlywayMigrateDatabaseCommand(String theMigrationTablename) {
|
||||
myMigrationTablename = theMigrationTablename;
|
||||
}
|
||||
|
||||
protected Set<String> getFlags() {
|
||||
return myFlags;
|
||||
|
@ -114,7 +110,7 @@ public abstract class BaseFlywayMigrateDatabaseCommand<T extends Enum> 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);
|
||||
|
|
|
@ -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<VersionEnum> {
|
||||
|
||||
public HapiFlywayMigrateDatabaseCommand() {
|
||||
super(SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<VersionEnum> provideAllowedVersions() {
|
||||
return Arrays.asList(VersionEnum.values());
|
||||
|
|
Loading…
Reference in New Issue