Files
Anatolii Grynchuk 73b506992c feat: add EF migrations and design-time factory
- Fix EmailEmailTemplateEntityConfiguration -> EmailTemplateEntityConfiguration
- Rename tables to match domain: templates->email_templates,
  providers->email_channels, provider_usage->email_channel_usage
- Add NotificationDbContextFactory for design-time migrations tooling
- Add InitialCreate migration: email_templates, email_channels, email_channel_usage

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-02 00:46:49 +03:00

16 lines
577 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace HrynCo.NotificationService.DAL.EF;
internal sealed class NotificationDbContextFactory : IDesignTimeDbContextFactory<NotificationDbContext>
{
public NotificationDbContext CreateDbContext(string[] args)
{
var options = new DbContextOptionsBuilder<NotificationDbContext>()
.UseNpgsql("Host=localhost;Port=5432;Database=notification_service;Username=postgres;Password=postgres")
.Options;
return new NotificationDbContext(options);
}
}