com.googlecode.flyway.core.migration.sql
Class SqlMigration
java.lang.Object
com.googlecode.flyway.core.migration.Migration
com.googlecode.flyway.core.migration.BaseMigration
com.googlecode.flyway.core.migration.sql.SqlMigration
- All Implemented Interfaces:
- java.lang.Comparable<Migration>
public class SqlMigration
- extends BaseMigration
Database migration based on a sql file.
|
Constructor Summary |
SqlMigration(org.springframework.core.io.Resource sqlScriptResource,
PlaceholderReplacer placeholderReplacer,
java.lang.String encoding,
java.lang.String versionString)
Creates a new sql script migration based on this sql script. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlMigration
public SqlMigration(org.springframework.core.io.Resource sqlScriptResource,
PlaceholderReplacer placeholderReplacer,
java.lang.String encoding,
java.lang.String versionString)
- Creates a new sql script migration based on this sql script.
- Parameters:
sqlScriptResource - The resource containing the sql script.placeholderReplacer - The placeholder replacer to apply to sql migration scripts.versionString - The migration name in standard Flyway format '__, e.g. 1_2__Descriptionencoding - The encoding of this Sql migration.
migrate
public void migrate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
DbSupport dbSupport)
- Description copied from class:
Migration
- Performs the migration.
- Specified by:
migrate in class Migration
- Parameters:
jdbcTemplate - To execute the migration statements.dbSupport - The support for database-specific extensions.
getMigrationType
public MigrationType getMigrationType()
- Specified by:
getMigrationType in class Migration
- Returns:
- The type of migration (INIT, SQL or JAVA)
Copyright © 2010. All Rights Reserved.