Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit f7253a4

Browse files
authored
Merge pull request #34 from MarcDonald/fix/add-location-to-migration
Add location field to database version 13 to 14 migration
2 parents 73b2a92 + 72c3a7e commit f7253a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ android {
3131
minSdkVersion 23
3232
//noinspection OldTargetApi
3333
targetSdkVersion 28
34-
versionCode 32
35-
versionName "1.3.0"
34+
versionCode 33
35+
versionName "1.3.1"
3636
setProperty("archivesBaseName", "Hibi-v$versionName")
3737
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3838
}

app/src/main/java/com/marcdonald/hibi/data/database/ProductionAppDatabase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ abstract class ProductionAppDatabase : RoomDatabase(), AppDatabase {
207207
"content TEXT NOT NULL," +
208208
"location TEXT NOT NULL DEFAULT ''," +
209209
"isFavourite INTEGER NOT NULL DEFAULT 0)")
210-
database.execSQL("INSERT INTO Entry(id, day, month, year, hour, minute, content) " +
211-
"SELECT id, day, month, year, hour, minute, content FROM EntryOLD")
210+
database.execSQL("INSERT INTO Entry(id, day, month, year, hour, minute, content, location) " +
211+
"SELECT id, day, month, year, hour, minute, content, location FROM EntryOLD")
212212
database.execSQL("DROP TABLE EntryOLD")
213213
}
214214
}

0 commit comments

Comments
 (0)