@Override
public ChangeStatus checkStatus(Database database) {
try {
ChangeStatus changeStatus = new ChangeStatus();
Column newColumn = SnapshotGeneratorFactory.getInstance().createSnapshot(new Column(Table.class, getCatalogName(), getSchemaName(), getTableName(), getNewColumnName()), database);
Column oldColumn = SnapshotGeneratorFactory.getInstance().createSnapshot(new Column(Table.class, getCatalogName(), getSchemaName(), getTableName(), getOldColumnName()), database);
if (newColumn == null && oldColumn == null) {
return changeStatus.unknown("Neither column exists");
}
if (newColumn != null && oldColumn != null) {