public class MigrationRunner extends Object
| Constructor and Description |
|---|
MigrationRunner(MigrationConfig migrationConfig) |
| Modifier and Type | Method and 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.
|
void |
run()
Run by creating a DB connection from driver, url, username defined in MigrationConfig.
|
void |
run(Connection connection)
Run the migrations if there are any that need running.
|
void |
run(Connection connection,
boolean checkStateMode)
Run the migrations if there are any that need running.
|
void |
run(DataSource dataSource)
Run using the connection from the DataSource.
|
public MigrationRunner(MigrationConfig migrationConfig)
public void run()
public List<LocalMigrationResource> checkState()
public List<LocalMigrationResource> checkState(DataSource dataSource)
public List<LocalMigrationResource> checkState(Connection connection)
public void run(DataSource dataSource)
public void run(Connection connection)
public void run(Connection connection, boolean checkStateMode)
Copyright © 2018. All rights reserved.