Search in sources :

Example 6 with MigrationInfoService

use of org.flywaydb.core.api.MigrationInfoService in project flyway by flyway.

the class InfoMojo method doExecute.

@Override
protected void doExecute(Flyway flyway) {
    MigrationInfoService info = flyway.info();
    MigrationInfo current = info.current();
    MigrationVersion currentSchemaVersion = current == null ? MigrationVersion.EMPTY : current.getVersion();
    log.info("Schema version: " + currentSchemaVersion);
    log.info("");
    log.info(MigrationInfoDumper.dumpToAsciiTable(info.all()));
}
Also used : MigrationInfo(org.flywaydb.core.api.MigrationInfo) MigrationVersion(org.flywaydb.core.api.MigrationVersion) MigrationInfoService(org.flywaydb.core.api.MigrationInfoService)

Example 7 with MigrationInfoService

use of org.flywaydb.core.api.MigrationInfoService in project incubator-gobblin by apache.

the class DatabaseJobHistoryStoreSchemaManager method info.

public void info() throws FlywayException {
    MigrationInfoService info = flyway.info();
    System.out.println(MigrationInfoDumper.dumpToAsciiTable(info.all()));
}
Also used : MigrationInfoService(org.flywaydb.core.api.MigrationInfoService)

Aggregations

MigrationInfoService (org.flywaydb.core.api.MigrationInfoService)7 MigrationInfo (org.flywaydb.core.api.MigrationInfo)4 MigrationVersion (org.flywaydb.core.api.MigrationVersion)3 Flyway (org.flywaydb.core.Flyway)2 MetricRegistry (com.codahale.metrics.MetricRegistry)1 PrintWriter (java.io.PrintWriter)1 Connection (java.sql.Connection)1 Callable (java.util.concurrent.Callable)1 DataSource (javax.sql.DataSource)1 FlywayCallback (org.flywaydb.core.api.callback.FlywayCallback)1 MigrationResolver (org.flywaydb.core.api.resolver.MigrationResolver)1 SqlScriptFlywayCallback (org.flywaydb.core.internal.callback.SqlScriptFlywayCallback)1 DbSupport (org.flywaydb.core.internal.dbsupport.DbSupport)1 Schema (org.flywaydb.core.internal.dbsupport.Schema)1 MigrationInfoServiceImpl (org.flywaydb.core.internal.info.MigrationInfoServiceImpl)1 MetaDataTable (org.flywaydb.core.internal.metadatatable.MetaDataTable)1 CompositeMigrationResolver (org.flywaydb.core.internal.resolver.CompositeMigrationResolver)1 TransactionTemplate (org.flywaydb.core.internal.util.jdbc.TransactionTemplate)1