|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.migration.DbMigrator
public class DbMigrator
Main workflow for migrating the database.
| Constructor Summary | |
|---|---|
DbMigrator(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport,
MetaDataTable metaDataTable)
Creates a new database migrator. |
|
| Method Summary | |
|---|---|
MetaDataTableRow |
applyMigration(Migration migration,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport)
Applies this migration to the database. |
void |
init(SchemaVersion version,
java.lang.String description)
Initializes the metadata table with this version and this description. |
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 |
| Constructor Detail |
|---|
public DbMigrator(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport,
MetaDataTable metaDataTable)
transactionTemplate - The transaction template to use.jdbcTemplate - JdbcTemplate with ddl manipulation access to the database.dbSupport - Database-specific functionality.metaDataTable - The database metadata table.| Method Detail |
|---|
public void init(SchemaVersion version,
java.lang.String description)
version - The version to initialize the metadata table with.description - The description for the ionitial version.
public int migrate(java.util.List<Migration> migrations)
throws java.lang.Exception
migrations - The available migrations.
java.lang.Exception - Thrown when a migration failed.
public final MetaDataTableRow applyMigration(Migration migration,
org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport)
migration - The migration to apply.transactionTemplate - The transaction template to use.jdbcTemplate - To execute the migration statements.dbSupport - The support for database-specific extensions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||