Commit b128fa73 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

postgres migration scripts moved to separate folder

parent cb6cef58
......@@ -25,9 +25,14 @@ public class CustomDatabasePopulator implements DatabasePopulator {
@Override
public void populate(Connection connection) throws ScriptException {
String migrationFolder = "postgres";
if (config.getDbDriver().equals("org.hsqldb.jdbcDriver")) {
migrationFolder = "hsql";
}
Flyway.configure().dataSource(config.getDbUri(), config.getDbUsername(), config.getDbPassword())
.baselineVersion("12.1.0")
.locations("classpath:lcsb.mapviewer.persist/migration", "classpath:db.migration")
.locations("classpath:lcsb.mapviewer.persist/migration/" + migrationFolder,
"classpath:db.migration." + migrationFolder)
.outOfOrder(true)
.baselineOnMigrate(true)
.validateOnMigrate(false)
......
package lcsb.mapviewer.persist.migration;
package lcsb.mapviewer.persist.migration.postgres;
import java.sql.ResultSet;
import java.sql.Statement;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment