use of liquibase.change.core.DropViewChange in project liquibase by liquibase.
the class UnexpectedViewChangeGenerator method fixUnexpected.
@Override
public Change[] fixUnexpected(DatabaseObject unexpectedObject, DiffOutputControl control, Database referenceDatabase, Database comparisonDatabase, ChangeGeneratorChain chain) {
View view = (View) unexpectedObject;
DropViewChange change = new DropViewChange();
change.setViewName(view.getName());
if (control.getIncludeCatalog()) {
change.setCatalogName(view.getSchema().getCatalogName());
}
if (control.getIncludeSchema()) {
change.setSchemaName(view.getSchema().getName());
}
for (Column column : view.getColumns()) {
control.setAlreadyHandledUnexpected(column);
}
;
return new Change[] { change };
}
Aggregations