#1903 - Add ability to set migration path via DbMigration

This commit is contained in:
rob bygrave
2020-01-10 16:06:18 +13:00
parent fa3de7158e
commit 57cfd25eb5
3 changed files with 29 additions and 1 deletions
@@ -91,6 +91,8 @@ public class DefaultDbMigration implements DbMigration {
protected String pathToResources = "src/main/resources";
protected String migrationPath;
protected DatabasePlatform databasePlatform;
private boolean vanillaPlatform;
@@ -138,6 +140,11 @@ public class DefaultDbMigration implements DbMigration {
this.pathToResources = pathToResources;
}
@Override
public void setMigrationPath(String migrationPath) {
this.migrationPath = migrationPath;
}
/**
* Set the server to use to determine the current model.
* Typically this is not called explicitly.
@@ -685,6 +692,9 @@ public class DefaultDbMigration implements DbMigration {
if (applyPrefix != null) {
migrationConfig.setApplyPrefix(applyPrefix);
}
if (migrationPath != null) {
migrationConfig.setMigrationPath(migrationPath);
}
if (header != null) {
migrationConfig.setDdlHeader(header);
}