com.googlecode.flyway.core.migration
Class DbMigrator
java.lang.Object
com.googlecode.flyway.core.migration.DbMigrator
public class DbMigrator
- extends java.lang.Object
Main workflow for migrating the database.
- Author:
- Axel Fontaine
|
Constructor Summary |
DbMigrator(java.sql.Connection connection,
java.sql.Connection connectionForMigrations,
DbSupport dbSupport,
MetaDataTable metaDataTable,
SchemaVersion target,
boolean ignoreFailedFutureMigration)
Creates a new database migrator. |
|
Method Summary |
int |
migrate(java.util.List<Migration> migrations)
Starts the actual migration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DbMigrator
public DbMigrator(java.sql.Connection connection,
java.sql.Connection connectionForMigrations,
DbSupport dbSupport,
MetaDataTable metaDataTable,
SchemaVersion target,
boolean ignoreFailedFutureMigration)
- Creates a new database migrator.
- Parameters:
connection - The connection to use.connectionForMigrations - The connection to use to perform the actual database migrations.dbSupport - Database-specific functionality.metaDataTable - The database metadata table.target - The target version of the migration.ignoreFailedFutureMigration - Flag whether to ignore failed future migrations or not.
migrate
public int migrate(java.util.List<Migration> migrations)
throws FlywayException
- Starts the actual migration.
- Parameters:
migrations - The available migrations.
- Returns:
- The number of successfully applied migrations.
- Throws:
FlywayException - when migration failed.
Copyright © 2012. All Rights Reserved.