Coding Challenge: Manual Room Migration
Explore how to perform a manual migration in the Room database by adding a new city field to the User entity. Learn to update your Android app's database schema, modify UI components for input and display, and implement read and write operations to handle the new data effectively.
We'll cover the following...
We'll cover the following...
Problem definition
We learned about manual data migrations in the "Handling Room Database Migrations" lesson. Let’s apply what we learned to add a new city field in the User entity and use it for read and write operations.
Instructions to follow:
Add the
cityfield in theUserentity by updating theUser.ktfile.Add a manual migration script to the
MyDatabase...