Added a user setting to chose darkmode or not

This commit is contained in:
emeric
2020-04-15 15:53:13 +02:00
parent c339d929d5
commit 4f560fe015
7 changed files with 118 additions and 55 deletions
+5 -1
View File
@@ -40,7 +40,7 @@
namespace Database {
#define LMS_DATABASE_VERSION 15
#define LMS_DATABASE_VERSION 16
using Version = std::size_t;
@@ -169,6 +169,10 @@ CREATE TABLE IF NOT EXISTS "track_bookmark" (
// Just increment the scan version of the settings to make the next scheduled scan rescan everything
ScanSettings::get(*this).modify()->incScanVersion();
}
else if (version == 15)
{
_session.execute("ALTER TABLE user ADD ui_theme INTEGER NOT NULL DEFAULT(" + std::to_string(static_cast<int>(User::defaultUITheme)) + ")");
}
else
{
LMS_LOG(DB, ERROR) << "Database version " << version << " cannot be handled using migration";