private void regenerateTables(SQLiteDatabase db) {
    dropAllTablesWithPrefix(db, "OLD_");

    for (String tableName : mTableNames)
      db.execSQL("ALTER TABLE " + tableName + " RENAME TO OLD_" + tableName);

    onCreate(db);

    for (String tableName : mTableNames) repopulateTable(db, tableName);

    dropAllTablesWithPrefix(db, "OLD_");
  }
 private void dropAllTables(SQLiteDatabase db) {
   dropAllTablesWithPrefix(db, "");
 }