Merge pull request #2357 from thaytan/metadata-index-e2eMangledName

syncjournaldb: index e2eMangledName column in metadata
This commit is contained in:
Kevin Ottens 2020-09-03 16:20:48 +02:00 committed by GitHub
commit a4cb7e3040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -745,6 +745,15 @@ bool SyncJournalDb::updateMetadataTableStructure()
commitInternal("update database structure: add contentChecksum col for uploadinfo");
}
if (true) {
SqlQuery query(_db);
query.prepare("CREATE INDEX IF NOT EXISTS metadata_e2e_id ON metadata(e2eMangledName);");
if (!query.exec()) {
sqlFail("updateMetadataTableStructure: create index e2eMangledName", query);
re = false;
}
commitInternal("update database structure: add e2eMangledName index");
}
return re;
}