mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1903 - Add ability to set migration path via DbMigration
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user