|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.flyway.core.Flyway
public class Flyway
Central service locator.
| Constructor Summary | |
|---|---|
Flyway()
|
|
| Method Summary | |
|---|---|
void |
clean()
Drops all object in the schema. |
MetaDataTable |
getMetaDataTable()
|
void |
init(SchemaVersion initialVersion)
Creates and initializes the Flyway metadata table. |
int |
migrate()
Starts the database migration. |
void |
setBaseDir(java.lang.String baseDir)
|
void |
setBasePackage(java.lang.String basePackage)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setPlaceholders(java.util.Map<java.lang.String,java.lang.String> placeholders)
|
void |
setSchemaMetaDataTable(java.lang.String schemaMetaDataTable)
|
void |
status()
Logs the status (current version) of the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Flyway()
| Method Detail |
|---|
public void setBasePackage(java.lang.String basePackage)
basePackage - The base package where the migrations are located. (default:
db.migration)public void setBaseDir(java.lang.String baseDir)
baseDir - The base directory on the classpath where the Sql migrations
are located. (default: sql/location)public void setSchemaMetaDataTable(java.lang.String schemaMetaDataTable)
schemaMetaDataTable - The name of the schema metadata table that will be used by
flyway. (default: schema_maintenance_history)public void setPlaceholders(java.util.Map<java.lang.String,java.lang.String> placeholders)
placeholders - A map of public MetaDataTable getMetaDataTable()
public void setDataSource(javax.sql.DataSource dataSource)
dataSource - The datasource to use. Must have the necessary privileges to
execute ddl.
public int migrate()
throws java.lang.Exception
java.lang.Exception - Thrown when the migration failed.public void clean()
public void status()
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||