com.github.joschi.dropwizard.flyway.DbInfoCommand Maven / Gradle / Ivy
package com.github.joschi.dropwizard.flyway;
import io.dropwizard.Configuration;
import io.dropwizard.db.DatabaseConfiguration;
import net.sourceforge.argparse4j.inf.Namespace;
import org.flywaydb.core.Flyway;
import static org.flywaydb.core.internal.info.MigrationInfoDumper.dumpToAsciiTable;
public class DbInfoCommand extends AbstractFlywayCommand {
public DbInfoCommand(final DatabaseConfiguration databaseConfiguration, final Class configurationClass) {
super("info", "Prints the details and status information about all the migrations.", databaseConfiguration, configurationClass);
}
@Override
public void run(final Namespace namespace, final Flyway flyway) throws Exception {
System.out.println(dumpToAsciiTable(flyway.info().all()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy