Class ColumnMigration

java.lang.Object
org.tentackle.model.migrate.ColumnMigration

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

    • 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 Details

    • 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
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object