android5-4 Exercise 2: Search and a schema change ============================================== @Query("SELECT * FROM notes WHERE text LIKE '%' || :term || '%' ORDER BY createdAt DESC") fun search(term: String): Flow> Adding a pinned: Boolean column to NoteEntity after release (general knowledge): raise @Database(version = 1) to 2 and provide a migration that adds the column to the existing table with a default value; without one, Room cannot open the existing database on phones that already have version 1 (it throws, unless you opt in to destructive fallback, which deletes the data). Room 2.x migrations use SupportSQLiteDatabase; in Room 3.0 migrations use SQLiteConnection (docs). The docs list AutoMigration for simple cases; see the migration guide for the current form. Code unrun.