diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java index eedb096b29e..d7e82dc5281 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/FlywayMigration.java @@ -5,12 +5,16 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import org.flywaydb.core.api.MigrationVersion; import org.flywaydb.core.api.migration.Context; import org.flywaydb.core.api.migration.JavaMigration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.sql.SQLException; import static org.apache.commons.lang3.StringUtils.isBlank; public class FlywayMigration implements JavaMigration { + private static final Logger ourLog = LoggerFactory.getLogger(FlywayMigration.class); + private final BaseTask myTask; private final FlywayMigrator myFlywayMigrator; private DriverTypeEnum.ConnectionProperties myConnectionProperties; diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java index 6fc35fa08ef..493cdcf084f 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/BaseTableColumnTypeTask.java @@ -21,9 +21,12 @@ package ca.uhn.fhir.jpa.migrate.taskdef; */ import ca.uhn.fhir.jpa.migrate.DriverTypeEnum; +import ca.uhn.fhir.jpa.migrate.FlywayMigration; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.util.Assert; import java.util.HashMap; @@ -31,6 +34,8 @@ import java.util.Map; import java.util.Objects; public abstract class BaseTableColumnTypeTask extends BaseTableColumnTask { + private static final Logger ourLog = LoggerFactory.getLogger(BaseTableColumnTypeTask.class); + private ColumnTypeEnum myColumnType; private Map> myColumnTypeToDriverTypeToSqlType = new HashMap<>(); @@ -202,7 +207,7 @@ public abstract class BaseTableColumnTypeTask extends B return new EqualsBuilder() .appendSuper(super.equals(theO)) - .append(myColumnType, that.myColumnType) + .append(myColumnType.name(), that.myColumnType.name()) .append(myNullable, that.myNullable) .append(myColumnLength, that.myColumnLength) .isEquals(); @@ -212,7 +217,7 @@ public abstract class BaseTableColumnTypeTask extends B public int hashCode() { return new HashCodeBuilder(17, 37) .appendSuper(super.hashCode()) - .append(myColumnType) + .append(myColumnType.name()) .append(myNullable) .append(myColumnLength) .toHashCode();