Pack logic cleanup
This commit is contained in:
@@ -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).
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user