using Jellyfin.Database.Providers.SqLite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Extensions.Logging.Abstractions; namespace Jellyfin.Server.Implementations.Migrations { /// /// The design time factory for . /// This is only used for the creation of migrations and not during runtime. /// internal sealed class DesignTimeJellyfinDbFactory : IDesignTimeDbContextFactory { public JellyfinDbContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlite("Data Source=jellyfin.db"); return new JellyfinDbContext( optionsBuilder.Options, NullLogger.Instance, new SqliteDatabaseProvider(null!, NullLogger.Instance)); } } }