From f4266bb35055687dbe46a7da54a9caeaad3fd9d4 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 11 Apr 2021 08:33:56 +0800 Subject: Version 4.3.0-beta2. Fix SQL migration issue when updating from version 18 to 19. --- app/build.gradle | 4 ++-- .../ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f3717c04..9d0a966e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "ml.docilealligator.infinityforreddit" minSdkVersion 21 targetSdkVersion 30 - versionCode 61 - versionName "4.3.0-beta1" + versionCode 62 + versionName "4.3.0-beta2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java index 4cb5cd43..f190a9fb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java @@ -329,7 +329,7 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase { private static final Migration MIGRATION_18_19 = new Migration(18, 19) { @Override public void migrate(@NonNull SupportSQLiteDatabase database) { - database.execSQL("INSERT INTO accounts(username, karma, is_current_user) VALUES (\"-\", 0, false)"); + database.execSQL("INSERT INTO accounts(username, karma, is_current_user) VALUES (\"-\", 0, 0)"); } }; -- cgit v1.2.3