Overview - Database migrations
What is it?
Database migrations are the process of changing a database's structure over time without losing existing data. In mobile apps, this means updating tables, columns, or indexes when the app updates. Migrations help keep the app's data organized and compatible with new features. They ensure users don't lose their data when the app changes its database.
Why it matters
Without migrations, updating an app's database could erase or corrupt user data, causing frustration and loss of trust. Migrations solve this by smoothly transforming the database structure while keeping data safe. This allows apps to evolve and add features without breaking existing data or user experience.
Where it fits
Before learning migrations, you should understand basic database concepts like tables and queries, and how to use SQLite or Room in Android. After migrations, you can explore advanced database optimization, version control for databases, and multi-user data syncing.