Updates liteDB to current version including database upgrade

This commit is contained in:
Serraniel 2023-03-18 15:03:57 +01:00
parent ed8c876e1b
commit e5320aad28
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3
2 changed files with 2 additions and 3 deletions

View file

@ -94,8 +94,7 @@ namespace DML.Application.Classes
} }
Logger.Debug("Loading database..."); Logger.Debug("Loading database...");
Database = new LiteDatabase(Path.Combine(DataDirectory, "config.db")); Database = new LiteDatabase($"Filename={Path.Combine(DataDirectory, "config.db")};upgrade=true");
Database.Log.Logging += (message) => Logger.Trace($"LiteDB: {message}");
Logger.Debug("Loading settings collection out of database..."); Logger.Debug("Loading settings collection out of database...");
var settingsDB = Database.GetCollection<Settings>("settings"); var settingsDB = Database.GetCollection<Settings>("settings");

View file

@ -18,7 +18,7 @@
<ProjectReference Include="..\libs\Discord.Net\src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" /> <ProjectReference Include="..\libs\Discord.Net\src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="LiteDB" Version="4.1.4" /> <PackageReference Include="LiteDB" Version="5.0.16" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" /> <PackageReference Include="NETStandard.Library" Version="2.0.3" />