From f1b380e6faf6ab6c8fa9c45e000dfe17ec6306cc Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 16 Jan 2020 20:57:12 +0100 Subject: [PATCH] rename file_name column to filename --- .../gallery/pro/databases/GalleryDatabase.kt | 4 ++-- .../com/simplemobiletools/gallery/pro/models/DateTaken.kt | 2 +- .../com/simplemobiletools/gallery/pro/models/Favorite.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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 5eb246150..1a09b301f 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,10 +60,10 @@ 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, `file_name` 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, `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, `file_name` TEXT NOT NULL, `parent_path` TEXT NOT NULL)") + 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)") database.execSQL("CREATE UNIQUE INDEX `index_favorites_full_path` ON `favorites` (`full_path`)") } } 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 a5e7e5a22..50c140994 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 @@ -11,6 +11,6 @@ import androidx.room.PrimaryKey data class DateTaken( @PrimaryKey(autoGenerate = true) var id: Int?, @ColumnInfo(name = "full_path") var fullPath: String, - @ColumnInfo(name = "file_name") var fileName: String, + @ColumnInfo(name = "filename") var filename: String, @ColumnInfo(name = "parent_path") var parentPath: String, @ColumnInfo(name = "last_fixed") var lastFixed: Int) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Favorite.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Favorite.kt index 4bd0449ad..8f37a9b41 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Favorite.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Favorite.kt @@ -9,5 +9,5 @@ import androidx.room.PrimaryKey data class Favorite( @PrimaryKey(autoGenerate = true) var id: Int?, @ColumnInfo(name = "full_path") var fullPath: String, - @ColumnInfo(name = "file_name") var fileName: String, + @ColumnInfo(name = "filename") var filename: String, @ColumnInfo(name = "parent_path") var parentPath: String)