fix test
This commit is contained in:
parent
de4c686c76
commit
ef77490c51
|
@ -441,7 +441,7 @@ public class JdbcUtils {
|
||||||
if ("SYSTEM TABLE".equalsIgnoreCase(tableType)) {
|
if ("SYSTEM TABLE".equalsIgnoreCase(tableType)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ("FLYWAY_SCHEMA_HISTORY".equalsIgnoreCase(tableName)) {
|
if (SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME.equalsIgnoreCase(tableName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.migrate.taskdef;
|
||||||
import ca.uhn.fhir.jpa.migrate.DriverTypeEnum;
|
import ca.uhn.fhir.jpa.migrate.DriverTypeEnum;
|
||||||
import ca.uhn.fhir.jpa.migrate.FlywayMigrator;
|
import ca.uhn.fhir.jpa.migrate.FlywayMigrator;
|
||||||
import ca.uhn.fhir.jpa.migrate.JdbcUtils;
|
import ca.uhn.fhir.jpa.migrate.JdbcUtils;
|
||||||
|
import ca.uhn.fhir.jpa.migrate.SchemaMigrator;
|
||||||
import org.apache.commons.dbcp2.BasicDataSource;
|
import org.apache.commons.dbcp2.BasicDataSource;
|
||||||
import org.intellij.lang.annotations.Language;
|
import org.intellij.lang.annotations.Language;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
@ -51,8 +52,8 @@ public class BaseTest {
|
||||||
@After
|
@After
|
||||||
public void resetMigrationVersion() throws SQLException {
|
public void resetMigrationVersion() throws SQLException {
|
||||||
Set<String> tableNames = JdbcUtils.getTableNames(getConnectionProperties());
|
Set<String> tableNames = JdbcUtils.getTableNames(getConnectionProperties());
|
||||||
if (tableNames.contains("flyway_schema_history")) {
|
if (tableNames.contains(SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME)) {
|
||||||
executeSql("DELETE from \"flyway_schema_history\" where \"installed_rank\" > 0");
|
executeSql("DELETE from " + SchemaMigrator.HAPI_FHIR_MIGRATION_TABLENAME + " where \"installed_rank\" > 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
the JPA server.
|
the JPA server.
|
||||||
</action>
|
</action>
|
||||||
<action type="change">
|
<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
|
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/.
|
to use flyway. Learn more about flyway on https://flywaydb.org/.
|
||||||
</action>
|
</action>
|
||||||
|
|
Loading…
Reference in New Issue