Interface MigrationContext


public interface MigrationContext
The current context while a migration runs.

This is used to provide meta-informations in JDBC migrations and mainly provides a read-only access to a subset of MigrationConfig.

It is possible to provide an extended implementation in MigrationEngine.run(context), which is accessible in JdbcMigration. So you can create a EbeanMigrationContext, so that you can access the current ebean server in the JDBC migration.

Author:
Roland Praml, FOCONIS AG
  • Method Details

    • connection

      Connection connection()
      The current connection. Note: During migration, this connection is always the same. You must not close this connection!
    • migrationPath

      String migrationPath()
      The migration path of SQL migrations. You can use this, to load additional SQL resources in your JDBC migration or determine, if this JDBC migration is for a particular path. This can be used if you have multiple ebean servers for different databases.
    • platform

      String platform()
      The platform of the current migration run. (e.g. sqlserver17)
    • basePlatform

      String basePlatform()
      The base platform of the current migration run. (e.g. sqlserver)