liquibase.snapshot.ext
Class MySQLDatabaseSnapshotGenerator

java.lang.Object
  extended by liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
      extended by liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator
          extended by liquibase.snapshot.ext.MySQLDatabaseSnapshotGenerator
All Implemented Interfaces:
liquibase.snapshot.DatabaseSnapshotGenerator

public class MySQLDatabaseSnapshotGenerator
extends liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator

Detect sequences created with the MysqlSequenceGenerator hack.

Author:
Leo Przybylski (leo [at] rsmart.com)

Field Summary
 
Fields inherited from interface liquibase.snapshot.DatabaseSnapshotGenerator
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
MySQLDatabaseSnapshotGenerator()
           
 
Method Summary
 int getPriority(liquibase.database.Database database)
           
protected  boolean isSequence(String tableName, DatabaseMetaData databaseMetaData)
           
protected  void readSequences(liquibase.snapshot.DatabaseSnapshot snapshot, String schema, DatabaseMetaData databaseMetaData)
           
protected  liquibase.database.structure.View readView(String name, liquibase.database.Database database)
           
protected  void readViews(liquibase.snapshot.DatabaseSnapshot snapshot, String schema, DatabaseMetaData databaseMetaData)
           
 
Methods inherited from class liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator
convertPrimaryKeyName, fillForeignKeyInfo, getColumnTypeAndDefValue, supports
 
Methods inherited from class liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
configureColumnType, convertColumnNameToDatabaseTableName, convertFromDatabaseName, convertTableNameToDatabaseTableName, convertToForeignKeyConstraintType, createSnapshot, generateForeignKey, getAdditionalForeignKeys, getColumn, getDatabaseChangeLogLockTable, getDatabaseChangeLogTable, getDatabaseType, getForeignKeyByForeignKeyTable, getForeignKeys, getMetaData, getTable, hasDatabaseChangeLogLockTable, hasDatabaseChangeLogTable, hasIndex, hasTable, hasView, isColumnAutoIncrement, readColumns, readForeignKeyInformation, readIndexes, readPrimaryKeys, readTables, readUniqueConstraints, updateListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLDatabaseSnapshotGenerator

public MySQLDatabaseSnapshotGenerator()
Method Detail

getPriority

public int getPriority(liquibase.database.Database database)
Specified by:
getPriority in interface liquibase.snapshot.DatabaseSnapshotGenerator
Overrides:
getPriority in class liquibase.snapshot.jvm.MySQLDatabaseSnapshotGenerator

readView

protected liquibase.database.structure.View readView(String name,
                                                     liquibase.database.Database database)
                                              throws liquibase.exception.DatabaseException
Throws:
liquibase.exception.DatabaseException

readViews

protected void readViews(liquibase.snapshot.DatabaseSnapshot snapshot,
                         String schema,
                         DatabaseMetaData databaseMetaData)
                  throws SQLException,
                         liquibase.exception.DatabaseException
Overrides:
readViews in class liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
Throws:
SQLException
liquibase.exception.DatabaseException

readSequences

protected void readSequences(liquibase.snapshot.DatabaseSnapshot snapshot,
                             String schema,
                             DatabaseMetaData databaseMetaData)
                      throws liquibase.exception.DatabaseException
Overrides:
readSequences in class liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
Throws:
liquibase.exception.DatabaseException

isSequence

protected boolean isSequence(String tableName,
                             DatabaseMetaData databaseMetaData)
                      throws SQLException
Throws:
SQLException


Copyright © 2011 Leo Przybylski. All Rights Reserved.