Slide 4
Slide 4 text
@Database(
entities = [ /* .. */ ],
version = 3,
autoMigrations = [
AutoMigration(from = 1, to = 2),
AutoMigration(
from = 2, to = 3,
spec = AppDatabase.AutoMigration2to3::class
)
]
)
abstract class AppDatabase : RoomDatabase() {
@RenameTable(fromTableName = "user", toTableName = "users")
class AutoMigration2to3 : AutoMigrationSpec
}
Auto Migrations