
com.github.joschi.dropwizard.flyway.cli.DbCleanCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-flyway Show documentation
Show all versions of dropwizard-flyway Show documentation
Addon bundle for Dropwizard to support Flyway for database migrations
The newest version!
package com.github.joschi.dropwizard.flyway.cli;
import com.github.joschi.dropwizard.flyway.FlywayConfiguration;
import io.dropwizard.Configuration;
import io.dropwizard.db.DatabaseConfiguration;
import net.sourceforge.argparse4j.inf.Namespace;
import org.flywaydb.core.Flyway;
public class DbCleanCommand extends AbstractFlywayCommand {
public DbCleanCommand(final DatabaseConfiguration databaseConfiguration,
final FlywayConfiguration flywayConfiguration,
final Class configurationClass) {
super("clean", "Drops all objects in the configured schemas.",
databaseConfiguration, flywayConfiguration, configurationClass);
}
@Override
protected void run(final Namespace namespace, final Flyway flyway) throws Exception {
flyway.clean();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy