Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add index on uploaded file ID

vishnukvmd28289605a87c
diff --git a/lib/db/files_db.dart b/lib/db/files_db.dart
index 39ff832103..4e6e7d1290 100644
--- a/lib/db/files_db.dart
+++ b/lib/db/files_db.dart
@@ -87,6 +87,7 @@ class FilesDB {
...updateIndexes(),
...createEntityDataTable(),
...addAddedTime(),
+ ...addIndexOnUploadedID(),
];
final dbConfig = MigrationConfig(
@@ -397,6 +398,14 @@ class FilesDB {
];
}
+ static List<String> addIndexOnUploadedID() {
+ return [
+ '''
+ CREATE INDEX IF NOT EXISTS uploaded_file_id_index ON $filesTable($columnUploadedFileID);
+ '''
+ ];
+ }
+
Future<void> clearTable() async {
final db = await instance.database;
await db.delete(filesTable);