|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.metadatatable.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<MetaDataTableRow> |
allAppliedMigrations()
|
void |
createIfNotExists()
Creates the metadata table if it doesn't already exist. |
boolean |
exists()
Checks whether Flyway's metadata table is already present in the database. |
boolean |
hasRows()
Checks whether the metadata table contains at least one row. |
void |
insert(MetaDataTableRow metaDataTableRow)
Adds this row to the metadata table and mark it as current. |
MetaDataTableRow |
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 boolean exists()
true if the table exists, false if it doesn't.public void createIfNotExists()
public void lock()
public void insert(MetaDataTableRow metaDataTableRow)
metaDataTableRow - The metaDataTableRow to add.public boolean hasRows()
true if the metadata table has at least on row. false if it is empty or it doesn't exist
yet.public MetaDataTableRow latestAppliedMigration()
null if no migration has been applied so far.public java.util.List<MetaDataTableRow> allAppliedMigrations()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||