Examples of MigrationManager


Examples of com.carbonfive.db.migration.MigrationManager

        getLog().info("Checking " + getUrl() + " using migrations at " + getMigrationsPath() + ".");

        Set<Migration> pendingMigrations;
        try
        {
            MigrationManager manager = createMigrationManager();
            pendingMigrations = manager.pendingMigrations();
        }
        catch (Exception e)
        {
            throw new MojoExecutionException("Failed to check " + getUrl(), e);
        }
View Full Code Here

Examples of com.carbonfive.db.migration.MigrationManager

    {
        getLog().info("Validating " + getUrl() + " using migrations at " + getMigrationsPath() + ".");

        try
        {
            MigrationManager manager = createMigrationManager();
            SortedSet<Migration> pendingMigrations = manager.pendingMigrations();
            StringBuilder sb = new StringBuilder();
            sb.append("\n            Database: ").append(getUrl());
            sb.append("\n          Up-to-date: ").append(pendingMigrations.isEmpty());
            sb.append("\n  Pending Migrations: ");
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager

public class ValidateMojo extends AbstractMigrationMojo {
    public void executeMojo() throws MojoExecutionException {
        getLog().info("Validating " + getUrl() + " using migrations at " + getMigrationsPath());
        try {
            Base.open(getDriver(), getUrl(), getUsername(), getPassword());
            MigrationManager manager = new MigrationManager(getMigrationsPath());
            List<Migration> pendingMigrations = manager.getPendingMigrations();

            getLog().info("Database: " + getUrl());
            getLog().info("Up-to-date: " + pendingMigrations.isEmpty());
            if (!pendingMigrations.isEmpty()) {
                getLog().info("Pending Migrations: ");
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager

    public void executeMojo() throws MojoExecutionException {
        getLog().info("Migrating " + getUrl() + " using migrations at " + getMigrationsPath());
        try{
            Base.open(getDriver(), getUrl(), getUsername(), getPassword());
            new MigrationManager(getMigrationsPath()).migrate(getLog(), getEncoding());
        }catch(Exception e){
            throw new MojoExecutionException("Failed to migrate database " + getUrl(), e);
        }
        finally {
            Base.close(true);
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager

        getLog().info("Checking " + getUrl() + " using migrations at " + getMigrationsPath());

        List<Migration> pendingMigrations;
        try {
            Base.open(getDriver(), getUrl(), getUsername(), getPassword());
            MigrationManager manager = new MigrationManager(getMigrationsPath());
            pendingMigrations = manager.getPendingMigrations();
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to check " + getUrl(), e);
        }finally {
            Base.close(true);
        }
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager

        } catch (Exception e) {/*ignore*/}
        Base.exec("create database mysql_migration_test");
        Base.close();

        Base.open("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/mysql_migration_test", "root", "p@ssw0rd");
        migrationManager = new MigrationManager("src/test/resources/test_migrations/mysql/");
    }
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager

    private MigrationManager migrationManager;

    @Before
    public void setup() throws Exception {
        Base.open("org.h2.Driver", "jdbc:h2:mem:h2-migration-test;DB_CLOSE_DELAY=-1", "sa", "");
        migrationManager = new MigrationManager("src/test/resources/test_migrations/h2/");
    }
View Full Code Here

Examples of org.javalite.db_migrator.MigrationManager


    @Before
    public void setup() throws Exception {
        Base.open("org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:./target/tmp/hsql-migration-test", "sa", "");
        migrationManager = new MigrationManager("src/test/resources/test_migrations/hsql/");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.