feat(theme): resolve database migration blocker and apply ThemePreference column
This commit is contained in:
@@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user