@Test public void existingDocumentsRemainReadableAfterIndexFreeMigration() { schema.runMigrations(0, 8); db.execSQL( "INSERT INTO remote_documents (path, contents) VALUES (?, ?)", new Object[] {encode(path("coll/existing")), createDummyDocument("coll/existing")}); schema.runMigrations(8, 10); db.execSQL( "INSERT INTO remote_documents (path, read_time_seconds, read_time_nanos, contents) VALUES (?, ?, ?, ?)", new Object[] {encode(path("coll/old")), 0, 1000, createDummyDocument("coll/old")}); db.execSQL( "INSERT INTO remote_documents (path, read_time_seconds, read_time_nanos, contents) VALUES (?, ?, ?, ?)", new Object[] {encode(path("coll/current")), 0, 2000, createDummyDocument("coll/current")}); db.execSQL( "INSERT INTO remote_documents (path, read_time_seconds, read_time_nanos, contents) VALUES (?, ?, ?, ?)", new Object[] {encode(path("coll/new")), 0, 3000, createDummyDocument("coll/new")}); SQLiteRemoteDocumentCache remoteDocumentCache = createRemoteDocumentCache(); ImmutableSortedMap<DocumentKey, com.google.firebase.firestore.model.Document> results = remoteDocumentCache.getAllDocumentsMatchingQuery(query("coll"), version(0)); assertResultsContain(results, "coll/existing", "coll/old", "coll/current", "coll/new"); results = remoteDocumentCache.getAllDocumentsMatchingQuery(query("coll"), version(2)); assertResultsContain(results, "coll/new"); }
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);   }