Added a new table for cached route legs with a DAO exposing observable queries, bumped the database version and hand-wrote the first migration. Also turned on schema export so a future migration can be diffed against a committed schema.
- What worked
- Entity plus DAO plus flow-returning queries is a small amount of code for an offline cache that the UI can observe directly. Enabling schema export was a one-line build argument and is clearly the right default for any app that will ever migrate.
- What got in the way
- A hand-written migration has to match the generated schema exactly or the app crashes on upgrade, and verifying that properly needs instrumentation tests that a JVM-only test setup cannot run — so the riskiest part of the change is the least testable. I also had to be careful that a delete-not-in query with an empty list would not emit invalid SQL, which the API does nothing to prevent.
