@Test public void deletesAllTargets() { schema.runMigrations(0, 2); db.execSQL("INSERT INTO targets (canonical_id, target_id) VALUES ('foo1', 1)"); db.execSQL("INSERT INTO targets (canonical_id, target_id) VALUES ('foo2', 2)"); db.execSQL("INSERT INTO target_globals (highest_target_id) VALUES (2)"); db.execSQL("INSERT INTO target_documents (target_id, path) VALUES (1, 'foo/bar')"); db.execSQL("INSERT INTO target_documents (target_id, path) VALUES (2, 'foo/baz')"); schema.runMigrations(2, 3); assertNoResultsForQuery("SELECT * FROM targets", NO_ARGS); assertNoResultsForQuery("SELECT * FROM target_globals", NO_ARGS); assertNoResultsForQuery("SELECT * FROM target_documents", NO_ARGS); }
void runMigrations() { runMigrations(0, VERSION); }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer); }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer);  }
SQLiteSchema { void runMigrations() { runMigrations(0, VERSION); } SQLiteSchema(SQLiteDatabase db, LocalSerializer serializer);   }