com.google.code.flyway.core
Class Flyway
java.lang.Object
com.google.code.flyway.core.Flyway
public class Flyway
- extends java.lang.Object
Central service locator.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Flyway
public Flyway()
setBasePackage
public void setBasePackage(java.lang.String basePackage)
- Parameters:
basePackage - The base package where the migrations are located. (default:
db.migration)
setBaseDir
public void setBaseDir(java.lang.String baseDir)
- Parameters:
baseDir - The base directory on the classpath where the Sql migrations
are located. (default: sql/location)
setSchemaMetaDataTable
public void setSchemaMetaDataTable(java.lang.String schemaMetaDataTable)
- Parameters:
schemaMetaDataTable - The name of the schema metadata table that will be used by
flyway. (default: schema_maintenance_history)
setPlaceholders
public void setPlaceholders(java.util.Map<java.lang.String,java.lang.String> placeholders)
- Parameters:
placeholders - A map of to apply to sql
migration scripts.
getMetaDataTable
public MetaDataTable getMetaDataTable()
- Returns:
- Supports reading and writing to the metadata table.
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
- Parameters:
dataSource - The datasource to use. Must have the necessary privileges to
execute ddl.
migrate
public int migrate()
throws java.lang.Exception
- Starts the database migration.
- Returns:
- The number of successfully applied migrations.
- Throws:
java.lang.Exception - Thrown when the migration failed.
clean
public void clean()
- Drops all object in the schema.
Copyright © 2010. All Rights Reserved.