From 631e9dea34968666604fe295997e32132ad2c682 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 16 Jan 2020 21:00:37 +0100 Subject: [PATCH] adding the actual DateTaken value column --- .../simplemobiletools/gallery/pro/databases/GalleryDatabase.kt | 2 +- .../com/simplemobiletools/gallery/pro/models/DateTaken.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt index 1a09b301f..9b01fe7cb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt @@ -60,7 +60,7 @@ abstract class GalleryDatabase : RoomDatabase() { private val MIGRATION_6_7 = object : Migration(6, 7) { override fun migrate(database: SupportSQLiteDatabase) { - database.execSQL("CREATE TABLE IF NOT EXISTS `date_takens` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `full_path` TEXT NOT NULL, `filename` TEXT NOT NULL, `parent_path` TEXT NOT NULL, `last_fixed` INTEGER NOT NULL)") + database.execSQL("CREATE TABLE IF NOT EXISTS `date_takens` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `full_path` TEXT NOT NULL, `filename` TEXT NOT NULL, `parent_path` TEXT NOT NULL, `date_taken` INTEGER NOT NULL, `last_fixed` INTEGER NOT NULL)") database.execSQL("CREATE UNIQUE INDEX `index_date_takens_full_path` ON `date_takens` (`full_path`)") database.execSQL("CREATE TABLE IF NOT EXISTS `favorites` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `full_path` TEXT NOT NULL, `filename` TEXT NOT NULL, `parent_path` TEXT NOT NULL)") diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/DateTaken.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/DateTaken.kt index 50c140994..293e2a619 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/DateTaken.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/DateTaken.kt @@ -13,4 +13,5 @@ data class DateTaken( @ColumnInfo(name = "full_path") var fullPath: String, @ColumnInfo(name = "filename") var filename: String, @ColumnInfo(name = "parent_path") var parentPath: String, + @ColumnInfo(name = "date_taken") var taken: Long, @ColumnInfo(name = "last_fixed") var lastFixed: Int)