Force next scan to full rescan database due to better cover detection. ref #89

This commit is contained in:
emeric
2020-08-24 14:08:04 +02:00
parent d30283eee5
commit 5e37ec865a
+7 -1
View File
@@ -40,7 +40,7 @@
namespace Database {
#define LMS_DATABASE_VERSION 25
#define LMS_DATABASE_VERSION 26
using Version = std::size_t;
@@ -272,6 +272,12 @@ CREATE TABLE "user_backup" (
// User's AuthMode
_session.execute("ALTER TABLE user ADD auth_mode INTEGER NOT NULL DEFAULT(" + std::to_string(static_cast<int>(User::defaultAuthMode)) + ")");
}
else if (version == 25)
{
// Better cover detection
// Just increment the scan version of the settings to make the next scheduled scan rescan everything
ScanSettings::get(*this).modify()->incScanVersion();
}
else
{
LMS_LOG(DB, ERROR) << "Database version " << version << " cannot be handled using migration";