#27 Fixed an error in migration to correct number format for LiteDB

This commit is contained in:
Serraniel 2019-02-16 20:58:56 +01:00
parent 8923659610
commit c5ab4a73a6
Signed by untrusted user who does not match committer: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -14,6 +14,9 @@
#endregion #endregion
using System;
using System.Collections.Generic;
using DML.AppCore.Classes;
using LiteDB; using LiteDB;
namespace DML.Application.Core namespace DML.Application.Core
@ -52,7 +55,7 @@ namespace DML.Application.Core
pseudoId = pseudoId - (1000UL * 60 * 60 * 24 << 22); // substract one random day of pseudo id just in case the timestamp has errors pseudoId = pseudoId - (1000UL * 60 * 60 * 24 << 22); // substract one random day of pseudo id just in case the timestamp has errors
} }
jobDoc["LastMessageId"] = pseudoId; jobDoc["LastMessageId"] = Convert.ToInt64(pseudoId); // LiteDB maps (u)long to Int64
jobDoc.Remove("KnownTimestamp"); jobDoc.Remove("KnownTimestamp");
Core.Database.Engine.Update("jobs", jobDoc); Core.Database.Engine.Update("jobs", jobDoc);