Add new service to handle profile migrations (#468)

* Add new service to handle profile migrations

* Handle various null checks

* Remove unecessary assignments

* Further works on this:

- Loads profiles as JObject's initally, so migration can take place on profiles that don't have proper compatability
- Adds prerequisite migrations, and sorts them after one another

* Throw exception if profile can't be deserialized after migration

* Cleanup & use profile version

* Further migrations work, support 3.10 & 3.11 profiles upgrading to 4.0

* Update parameter name
This commit is contained in:
Jesse
2025-07-11 14:11:02 +02:00
committed by GitHub
parent 12699d799f
commit 533a7356fd
11 changed files with 751 additions and 24 deletions
@@ -70,12 +70,6 @@ public class GameController(
return;
}
fullProfile.SptData ??= new Spt
{
//TODO: complete
Version = "Replace_me",
};
fullProfile.SptData.Migrations ??= new Dictionary<string, long>();
fullProfile.FriendProfileIds ??= [];
if (fullProfile.ProfileInfo?.IsWiped is not null && fullProfile.ProfileInfo.IsWiped.Value)