mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
minor fixes for migration
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ public class DbRunMigrationPlugin implements Plugin {
|
||||
migrationRunner.setDefaultDbSchema(dbSchema);
|
||||
}
|
||||
migrationRunner.setName(config.getName());
|
||||
migrationRunner.setPlatform(config.getDatabasePlatform().getPlatform().base().name().toLowerCase());
|
||||
migrationRunner.setPlatform(config.getDatabasePlatform().getPlatform().name().toLowerCase());
|
||||
migrationRunner.loadProperties(config.getProperties());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class DbMigrationPlugin implements Plugin {
|
||||
lastInit = dbMigration.generateInitMigration();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Error while generating migration");
|
||||
throw new RuntimeException("Error while generating migration", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -13,6 +13,7 @@ import java.util.StringJoiner;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import io.avaje.classpath.scanner.core.Location;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Database;
|
||||
import io.ebean.annotation.Platform;
|
||||
@@ -863,7 +864,8 @@ public class DefaultDbMigration implements DbMigration {
|
||||
}
|
||||
|
||||
private String migrationPath(boolean initMigration) {
|
||||
return initMigration ? migrationInitPath : migrationPath;
|
||||
// remove classpath: or filesystem: prefix
|
||||
return new Location(initMigration ? migrationInitPath : migrationPath).path();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user