Pack logic cleanup

This commit is contained in:
gamer147
2026-05-24 09:27:10 -04:00
parent 79209bd70b
commit d9ef9fe1fc
33 changed files with 71175 additions and 245 deletions

View File

@@ -1,6 +1,5 @@
using SVSim.Database.Common;
using Microsoft.EntityFrameworkCore;
using SVSim.Database.Models;
using SVSim.Database.Common;
namespace SVSim.Database.DataSeeders;
@@ -8,21 +7,10 @@ public class DefaultSettingsSeeder : IDataSeeder
{
public void Seed(ModelBuilder builder)
{
builder.Entity<GameConfiguration>().HasData(new GameConfiguration
{
Id = "default",
DefaultCrystals = 50000,
DefaultRupees = 50000,
DefaultEther = 50000,
MaxFriends = 20,
DefaultEmblemId = 100000000,
DefaultDegreeId = 300003,
DefaultMyPageBackgroundId = 100000000,
DefaultSleeveId = 3000011,
DefaultDegree = null,
DefaultEmblem = null,
DefaultSleeve = null,
DefaultMyPageBackground = null
});
// GameConfiguration is seeded at runtime (see SVSimDbContext.EnsureSeedDataAsync),
// NOT via HasData — EF Core 8's HasData+OwnsOne(...).ToJson combo doesn't reliably
// populate the jsonb cell, leading to NOT NULL violations on a fresh DB. Runtime
// seeding writes a full `GameConfigRoot()` (all sub-config POCO initialisers
// produce the canonical defaults).
}
}
}