Created
November 11, 2018 20:44
-
-
Save sienatime/3b7e180bbae021475bef0d056b6ea81f 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
Room.databaseBuilder(...) | |
.addMigrations(new Migration(3, 4) { | |
@Override public void migrate(@NonNull SupportSQLiteDatabase database) { | |
database.execSQL("CREATE VIRTUAL TABLE IF NOT EXISTS `entriesFts` USING FTS4(`primary_kanji`, `primary_reading`, `other_kanji`, `other_readings`, content=`entries`)"); | |
database.execSQL("INSERT INTO entriesFts(entriesFts) VALUES ('rebuild')"); | |
} | |
}) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment