Class ColumnMigration


  • public class ColumnMigration
    extends Object
    Explicit column migration for a given table.
    • Constructor Detail

      • ColumnMigration

        public ColumnMigration​(String columnName,
                               String newColumnName,
                               String sql)
        Creates an explicit migration for a column.
        Parameters:
        columnName - the column name
        newColumnName - the new column name if renamed
        sql - the SQL code
    • Method Detail

      • getColumnName

        public String getColumnName()
        Gets the (old) column name.
        Returns:
        the column name
      • getNewColumnName

        public String getNewColumnName()
        Gets the new column name if column is renamed.

        Returns:
        the renamed column, null if no rename
      • getSql

        public String getSql()
        The sql code to migrate this column.

        Returns:
        sql code
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object