|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.runtime.MetaDataTable
public class MetaDataTable
Supports reading and writing to the metadata table.
| Constructor Summary | |
|---|---|
MetaDataTable(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport,
java.lang.String tableName)
Creates a new instance of the metadata table support. |
|
| Method Summary | |
|---|---|
java.util.List<Migration> |
allAppliedMigrations()
|
void |
createIfNotExists()
Creates the metadata table if it doesn't already exist. |
void |
finishMigration(Migration migration)
Persists the result of this migration. |
void |
init(SchemaVersion initialVersion)
Creates and initializes the Flyway metadata table. |
Migration |
latestAppliedMigration()
|
void |
lock()
Acquires an exclusive read-write lock on the metadata table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetaDataTable(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport,
java.lang.String tableName)
transactionTemplate - The transaction template to use.jdbcTemplate - JdbcTemplate with ddl manipulation access to the
database.dbSupport - Database-specific functionality.tableName - The name of the schema metadata table used by flyway.| Method Detail |
|---|
public void createIfNotExists()
public void init(SchemaVersion initialVersion)
initialVersion - (optional) The initial version to put in the metadata table.
Only migrations with a version number higher than this one
will be considered for this database.
null defaults the initial version to 0.public void lock()
public void finishMigration(Migration migration)
migration - The migration that was run.public Migration latestAppliedMigration()
null if no migration has been applied so far.public java.util.List<Migration> allAppliedMigrations()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||