com.google.code.flyway.core.sql
Class SqlMigration

java.lang.Object
  extended by com.google.code.flyway.core.Migration
      extended by com.google.code.flyway.core.BaseMigration
          extended by com.google.code.flyway.core.sql.SqlMigration

public class SqlMigration
extends BaseMigration

Database migration based on a sql file.


Field Summary
 
Fields inherited from class com.google.code.flyway.core.Migration
executionTime, migrationState, schemaVersion, scriptName
 
Constructor Summary
SqlMigration(org.springframework.core.io.Resource sqlScriptResource, java.util.Map<java.lang.String,java.lang.String> placeholders)
          Creates a new sql script migration based on this sql script.
 
Method Summary
 void doMigrate(org.springframework.transaction.support.TransactionTemplate transactionTemplate, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, DbSupport dbSupport)
          Performs the migration.
 
Methods inherited from class com.google.code.flyway.core.BaseMigration
initVersion
 
Methods inherited from class com.google.code.flyway.core.Migration
assertNotFailed, getExecutionTime, getScriptName, getState, getVersion, migrate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlMigration

public SqlMigration(org.springframework.core.io.Resource sqlScriptResource,
                    java.util.Map<java.lang.String,java.lang.String> placeholders)
Creates a new sql script migration based on this sql script.

Parameters:
sqlScriptResource - The resource containing the sql script.
placeholders - The placeholders to replace in the sql script.
Method Detail

doMigrate

public void doMigrate(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
                      org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                      DbSupport dbSupport)
Description copied from class: Migration
Performs the migration.

Overrides:
doMigrate in class Migration
Parameters:
transactionTemplate - The transaction template to use.
jdbcTemplate - To execute the migration statements.
dbSupport - The support for database-specific extensions.


Copyright © 2010. All Rights Reserved.