replace fetching of query strings with running of tasks

This commit is contained in:
Mike G 2020-09-03 00:58:49 -04:00
parent 60c03c429b
commit faab567095
1 changed files with 8 additions and 7 deletions

View File

@ -63,14 +63,15 @@ public class DropTableTask extends BaseTableTask {
}
}
DropIndexTask theIndexTask = new DropIndexTask(getMyProductVersion(), getMySchemaVersion());
theIndexTask
.setTableName(getTableName())
.setConnectionProperties(getConnectionProperties())
.setDriverType(getDriverType());
for (String nextIndex : indexNames) {
List<String> sqls = DropIndexTask.createDropIndexSql(getConnectionProperties(), getTableName(), nextIndex, getDriverType());
if (!sqls.isEmpty()) {
logInfo(ourLog, "Dropping index {} on table {} in preparation for table delete", nextIndex, getTableName());
}
for (@Language("SQL") String sql : sqls) {
executeSql(getTableName(), sql);
}
theIndexTask
.setIndexName(nextIndex)
.execute();
}
logInfo(ourLog, "Dropping table: {}", getTableName());