Fixed regression that prevent new installs to work. fixes #385
This commit is contained in:
@@ -30,6 +30,16 @@
|
||||
|
||||
namespace Database
|
||||
{
|
||||
void ScanSettings::init(Session& session)
|
||||
{
|
||||
session.checkWriteTransaction();
|
||||
|
||||
if (pointer settings{ get(session) })
|
||||
return;
|
||||
|
||||
session.getDboSession().add(std::make_unique<ScanSettings>());
|
||||
}
|
||||
|
||||
ScanSettings::pointer ScanSettings::get(Session& session)
|
||||
{
|
||||
session.checkReadTransaction();
|
||||
|
||||
@@ -171,6 +171,12 @@ namespace Database
|
||||
_session.execute("CREATE INDEX IF NOT EXISTS starred_track_user_backend_idx ON starred_track(user_id,backend)");
|
||||
_session.execute("CREATE INDEX IF NOT EXISTS starred_track_track_user_backend_idx ON starred_track(track_id,user_id,backend)");
|
||||
}
|
||||
|
||||
// Singletons
|
||||
{
|
||||
auto uniqueTransaction{ createWriteTransaction() };
|
||||
ScanSettings::init(*this);
|
||||
}
|
||||
}
|
||||
|
||||
void Session::analyze()
|
||||
|
||||
Reference in New Issue
Block a user