Created
November 11, 2022 10:49
-
-
Save gokmenbayram/4e0e26c5d8d3f838c8579974e51563d9 to your computer and use it in GitHub Desktop.
AutoMigrationSpec
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 = [ User.class ], | |
autoMigrations = [ | |
AutoMigration ( | |
from = 1, | |
to = 2, | |
spec = UserDatabase.UserAutoMigration::class | |
) | |
] | |
) | |
abstract class UserDatabase : RoomDatabase { | |
@RenameTable(fromTableName = "User", toTableName = "SuperUser") | |
class UserAutoMigration: AutoMigrationSpec { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment