Search⌘ K
AI Features

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.

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:

  1. Add the city field in the User entity by updating the User.kt file.

  2. Add a manual migration script to the MyDatabase ...