~/talk

Practical room migrations

Talkat Android Dev Summit 2022 · 2022-10-24..11-14· [android, databases]
links:none on file
slides:none on file

Room’s migration flow is practical and concrete: Auto Migrations generate implementations if schemas are exported, and ambiguous renames use a Migration Spec with annotations like RenameTable/RenameColumn/DeleteColumn/DeleteTable and a PostMigrate hook for data conversion. Manual migrations run before an auto migration to sanitize rows (example: remove invalid child foreign-key refs) so adding constraints succeeds. Tests use the Migration Test Helper and runMigrationsAndValidate to create old-version DBs, migrate, validate schema, and assert migrated data.

AI-written summary · about

  1. 0:00Intro
  2. 0:22Not every database needs to be migrated
  3. 1:07Auto migrations
  4. 2:22Postmigrate
  5. 3:00Manual migration
  6. 3:27Manual migration example
  7. 3:54Column info migration
  8. 4:18Migration box
  9. 4:48Testing migrations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.