feat(theme): resolve database migration blocker and apply ThemePreference column

This commit is contained in:
2026-06-07 12:45:56 +02:00
parent ce4687ee93
commit c54ece9bd6
34 changed files with 1477 additions and 65 deletions
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NexusReader.Domain.Entities;
using NexusReader.Domain.Enums;
namespace NexusReader.Data.Persistence;
@@ -43,6 +44,10 @@ public class AppDbContext : IdentityDbContext<NexusUser>
// Note: DefaultValue for int is 1 (which corresponds to 'Free' in our seed)
entity.Property(u => u.SubscriptionPlanId)
.HasDefaultValue(1);
entity.Property(u => u.ThemePreference)
.HasConversion<int>()
.HasDefaultValue(ThemeMode.System);
});
modelBuilder.Entity<SubscriptionPlan>(entity =>