Class MigrationRunner

java.lang.Object
io.ebean.migration.MigrationRunner

public class MigrationRunner extends Object
Runs the DB migration typically on application start.
  • Field Details

  • Constructor Details

    • MigrationRunner

      public MigrationRunner(MigrationConfig migrationConfig)
  • Method Details

    • checkState

      public List<MigrationResource> checkState()
      Return the migrations that would be applied if the migration is run.
    • checkState

      public List<MigrationResource> checkState(DataSource dataSource)
      Return the migrations that would be applied if the migration is run.
    • checkState

      public List<MigrationResource> checkState(Connection connection)
      Return the migrations that would be applied if the migration is run.
    • checkState

      public List<MigrationResource> checkState(MigrationContext context)
      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.
    • run

      public void run(MigrationContext context)
      Run the migrations if there are any that need running.