Exemplo n.º 1
0
  /** Drops all tables of the current database. */
  public void drop() {
    open();

    mDbHelper.drop(mDb);

    close();

    ModelCache.reset();
  }
Exemplo n.º 2
0
  public void resetMigrations() {
    open();

    String sql = "DROP TABLE IF EXISTS `" + DatabaseBuilder.getTableName(Migration.class) + "`;";
    mDb.execSQL(sql);

    ModelCache.reset(DatabaseBuilder.getTableName(Migration.class));

    close();
  }
Exemplo n.º 3
0
  /**
   * Drops a specific table
   *
   * @param tableName Name of the table to drop.
   */
  public void drop(String tableName) {
    open();

    String sql = "DROP TABLE IF EXISTS `" + tableName + "`;";
    mDb.execSQL(sql);

    ModelCache.reset(tableName);

    close();
  }