Created
June 9, 2021 17:59
-
-
Save varundwarkani/1afa176dbdb5d610dbf8fc96b2a77d30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Database( | |
version = 2, | |
entities = [AppSettings::class, UserData::class, Quiz::class, QuizData::class], | |
autoMigrations = [AutoMigration(from = 1, to = 2, spec = AppDatabase.MigrateQuizQuesToQuizQuestion::class)], | |
exportSchema = true | |
) | |
abstract class AppDatabase : RoomDatabase() { | |
@RenameColumn(tableName = "Quiz", fromColumnName = "QuizQues", toColumnName = "QuizQuestion") | |
class MigrateQuizQuesToQuizQuestion : AutoMigrationSpec { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment