Skip to content

Instantly share code, notes, and snippets.

@deepanshu42
Created May 23, 2020 08:48
Show Gist options
  • Save deepanshu42/aafde7dbc61f79653f014f7c21232689 to your computer and use it in GitHub Desktop.
Save deepanshu42/aafde7dbc61f79653f014f7c21232689 to your computer and use it in GitHub Desktop.
Room Database Migration Example
val MIGRATION_1_2 = object : Migration(1, 2) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("ALTER TABLE users ADD COLUMN age INTEGER")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment