mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
ENH: Add DB Migration runner (as alternative to running via FlywayDB etc) #636
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
package com.avaje.ebean.dbmigration;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.EbeanServer;
|
||||
import com.avaje.ebean.config.DbMigrationConfig;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
public class MigrationRunnerTest {
|
||||
public class MigrationRunnerTest extends BaseTestCase {
|
||||
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
if (!isH2()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EbeanServer server = Ebean.getDefaultServer();
|
||||
|
||||
DbMigrationConfig config = new DbMigrationConfig();
|
||||
@@ -20,8 +25,6 @@ public class MigrationRunnerTest {
|
||||
config.setDbUser("sa");
|
||||
config.setDbPassword("");
|
||||
|
||||
MigrationRunner runner = new MigrationRunner(server, config);
|
||||
|
||||
runner.run();
|
||||
new MigrationRunner(server, config).run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user