List<String> viewSql = new ArrayList<String>();
String sourceTableName = sourceTable.getName();
String newTableName = newTable.getName();
Database db = sourceTable.getDatabase();
// save the real table under a temporary name
db.renameSchemaObject(session, sourceTable, db.getTempTableName(session));
try {
// have our new table impersonate the target table
db.renameSchemaObject(session, newTable, sourceTableName);
checkViewsAreValid(sourceTable, viewSql);
} finally {