dbConfigName = DBConfig.defaultDbConfigName;
}
try {
List<String> names = new ArrayList<String>();
DBConfig dbConfig = DB.getDBConfig(dbConfigName);
ResultSet rs = dbConfig.getConnection().getMetaData().getTables(null, null, null, new String[]{"TABLE"});
while (rs.next()) {
String name = rs.getString("TABLE_NAME");
names.add(name);
}
disableForeignKeyConstraints(dbConfig);
for (String name : names) {
if(Arrays.binarySearch(dontDeleteTheseTables, name) < 0) {
if (Logger.isTraceEnabled()) {
Logger.trace("Dropping content of table %s", name);
}
dbConfig.execute(getDeleteTableStmt(dbConfig.getUrl(), name) + ";");
}
}
enableForeignKeyConstraints(dbConfig);
Play.pluginCollection.afterFixtureLoad();
} catch (Exception e) {