back out schema initialize naming. there may be migrated schemas in the wild this would interfere with.
This commit is contained in:
parent
f29118fa9c
commit
c27dfdff51
|
@ -39,7 +39,7 @@ public class InitializeSchemaTask extends BaseTask<InitializeSchemaTask> {
|
|||
public InitializeSchemaTask(String theProductVersion, String theSchemaVersion, ISchemaInitializationProvider theSchemaInitializationProvider) {
|
||||
super(theProductVersion, theSchemaVersion);
|
||||
mySchemaInitializationProvider = theSchemaInitializationProvider;
|
||||
setDescription("Initialize schema for " + theSchemaInitializationProvider.getDescription());
|
||||
setDescription("Initialize schema");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -885,7 +885,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|||
private void init330() { // 20180114 - 20180329
|
||||
Builder version = forVersion(VersionEnum.V3_3_0);
|
||||
|
||||
version.initializeSchema("20180115.0", new SchemaInitializationProvider("HAPI-FHIR", "/ca/uhn/hapi/fhir/jpa/docs/database", "HFJ_RESOURCE"));
|
||||
version.initializeSchema("20180115.0", new SchemaInitializationProvider("/ca/uhn/hapi/fhir/jpa/docs/database", "HFJ_RESOURCE"));
|
||||
|
||||
Builder.BuilderWithTableName hfjResource = version.onTable("HFJ_RESOURCE");
|
||||
version.startSectionWithMessage("Starting work on table: " + hfjResource.getTableName());
|
||||
|
|
|
@ -38,17 +38,14 @@ import java.util.regex.Pattern;
|
|||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
public class SchemaInitializationProvider implements ISchemaInitializationProvider {
|
||||
private final String mySchemaDescription;
|
||||
private final String mySchemaFileClassPath;
|
||||
private final String mySchemaExistsIndicatorTable;
|
||||
|
||||
/**
|
||||
* @param theSchemaDescription description of the schema being updated (for logging)
|
||||
* @param theSchemaFileClassPath pathname to script used to initialize schema
|
||||
* @param theSchemaExistsIndicatorTable a table name we can use to determine if this schema has already been initialized
|
||||
*/
|
||||
public SchemaInitializationProvider(String theSchemaDescription, String theSchemaFileClassPath, String theSchemaExistsIndicatorTable) {
|
||||
mySchemaDescription = theSchemaDescription;
|
||||
public SchemaInitializationProvider(String theSchemaFileClassPath, String theSchemaExistsIndicatorTable) {
|
||||
mySchemaFileClassPath = theSchemaFileClassPath;
|
||||
mySchemaExistsIndicatorTable = theSchemaExistsIndicatorTable;
|
||||
}
|
||||
|
@ -85,11 +82,6 @@ public class SchemaInitializationProvider implements ISchemaInitializationProvid
|
|||
return matcher.replaceAll("$1\\)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return mySchemaDescription;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
protected String getInitScript(DriverTypeEnum theDriverType) {
|
||||
return theDriverType.getSchemaFilename();
|
||||
|
|
|
@ -28,6 +28,4 @@ public interface ISchemaInitializationProvider {
|
|||
List<String> getSqlStatements(DriverTypeEnum theDriverType);
|
||||
|
||||
String getSchemaExistsIndicatorTable();
|
||||
|
||||
String getDescription();
|
||||
}
|
||||
|
|
|
@ -40,11 +40,6 @@ public class InitializeSchemaTaskTest extends BaseTest {
|
|||
return "DONT_MATCH_ME";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "test";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object theO) {
|
||||
if (this == theO) return true;
|
||||
|
|
Loading…
Reference in New Issue