Package io.ebean.migration
Class MigrationRunner
- java.lang.Object
-
- io.ebean.migration.MigrationRunner
-
public class MigrationRunner extends Object
Runs the DB migration typically on application start.
-
-
Constructor Summary
Constructors Constructor Description MigrationRunner(MigrationConfig migrationConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LocalMigrationResource>checkState()Return the migrations that would be applied if the migration is run.List<LocalMigrationResource>checkState(Connection connection)Return the migrations that would be applied if the migration is run.List<LocalMigrationResource>checkState(DataSource dataSource)Return the migrations that would be applied if the migration is run.voidrun()Run by creating a DB connection from driver, url, username defined in MigrationConfig.voidrun(Connection connection)Run the migrations if there are any that need running.voidrun(DataSource dataSource)Run using the connection from the DataSource.
-
-
-
Constructor Detail
-
MigrationRunner
public MigrationRunner(MigrationConfig migrationConfig)
-
-
Method Detail
-
checkState
public List<LocalMigrationResource> checkState()
Return the migrations that would be applied if the migration is run.
-
checkState
public List<LocalMigrationResource> checkState(DataSource dataSource)
Return the migrations that would be applied if the migration is run.
-
checkState
public List<LocalMigrationResource> checkState(Connection connection)
Return the migrations that would be applied if the migration is run.
-
run
public void run()
Run by creating a DB connection from driver, url, username defined in MigrationConfig.
-
run
public void run(DataSource dataSource)
Run using the connection from the DataSource.
-
run
public void run(Connection connection)
Run the migrations if there are any that need running.
-
-