• 4 Posts
  • 59 Comments
Joined 1 year ago
cake
Cake day: June 20th, 2023

help-circle


  • Yes, the migration happens when the user opens the new version of the app.

    Basically you start versioning the database table schemas. If you modify tables, you say “If DB schema is moving from v2 -> v3, update these table columns in the following way…”.

    This is what you’re meant to do, rather than dropping all existing tables (and data) when there’s a conflict. It’s tedious dev work but it avoids pissing off users. Using an “ORM” layer for the database can help make this sort of thing easier.

    On the other hand, user preferences are probably not stored this way at all, and it’s the fact that a new app project was created from scratch that destroyed the existing user data. In Android, there’s libraries specifically for storing app user preferences that require almost no maintenance.