use of liquibase.statement.core.RenameTableStatement in project liquibase by liquibase.
the class RenameTableChange method generateStatements.
@Override
public SqlStatement[] generateStatements(Database database) {
List<SqlStatement> statements = new ArrayList<>();
statements.add(new RenameTableStatement(getCatalogName(), getSchemaName(), getOldTableName(), getNewTableName()));
if (database instanceof DB2Database) {
statements.add(new ReorganizeTableStatement(getCatalogName(), getSchemaName(), getNewTableName()));
}
return statements.toArray(new SqlStatement[statements.size()]);
}
Aggregations