This commit is contained in:
Ken Stevens 2019-11-26 09:50:40 -05:00
parent de4c686c76
commit ef77490c51
3 changed files with 5 additions and 4 deletions

View File

@ -441,7 +441,7 @@ public class JdbcUtils {
if ("SYSTEM TABLE".equalsIgnoreCase(tableType)) {
continue;
}
if ("FLYWAY_SCHEMA_HISTORY".equalsIgnoreCase(tableName)) {
if (SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME.equalsIgnoreCase(tableName)) {
continue;
}

View File

@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef;
import ca.uhn.fhir.jpa.migrate.DriverTypeEnum;
import ca.uhn.fhir.jpa.migrate.FlywayMigrator;
import ca.uhn.fhir.jpa.migrate.JdbcUtils;
import ca.uhn.fhir.jpa.migrate.SchemaMigrator;
import org.apache.commons.dbcp2.BasicDataSource;
import org.intellij.lang.annotations.Language;
import org.junit.After;
@ -51,8 +52,8 @@ public class BaseTest {
@After
public void resetMigrationVersion() throws SQLException {
Set<String> tableNames = JdbcUtils.getTableNames(getConnectionProperties());
if (tableNames.contains("flyway_schema_history")) {
executeSql("DELETE from \"flyway_schema_history\" where \"installed_rank\" > 0");
if (tableNames.contains(SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME)) {
executeSql("DELETE from " + SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME + " where \"installed_rank\" > 0");
}
}

View File

@ -42,7 +42,7 @@
the JPA server.
</action>
<action type="change">
Changed database migration to use flyway. This adds a new table called flyway_schema_history that records all
Changed database migration to use flyway. This adds a new table called FLY_HFJ_MIGRATION that records all
database migration tasks that have already been applied. The hapi-fhir-cli migrate tool has been changed
to use flyway. Learn more about flyway on https://flywaydb.org/.
</action>