From ca6b84be8121ab6759a75932b1a765e5f60f92b2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 15 Jan 2020 23:00:52 +0100 Subject: [PATCH] adding an index on DateTakens table --- .../simplemobiletools/gallery/pro/databases/GalleryDatabase.kt | 1 + 1 file changed, 1 insertion(+) 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 fa7c30bcd..2d0398675 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 @@ -65,6 +65,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, `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`)") } } }