netmash/infrastructure/Netmash.Infrastructure.Data.../DbContexts/MigrationDbContext.cs

25 lines
880 B
C#
Raw Normal View History

2022-01-21 11:19:51 +02:00
using Microsoft.EntityFrameworkCore;
2023-01-12 01:01:36 +02:00
using Netmash.Infrastructure.DatabaseMigration.Entities;
using Netmash.Infrastructure.DatabaseMigration.Entities.Configurations;
2022-01-21 11:19:51 +02:00
2023-01-12 01:01:36 +02:00
namespace Netmash.Infrastructure.DatabaseMigration.DbContexts
2022-01-21 11:19:51 +02:00
{
internal class MigrationDbContext : DbContext
{
public MigrationDbContext(DbContextOptions<MigrationDbContext> options) : base(options)
{
}
public DbSet<MigrationSignature> MigrationSignatures { get; set; }
2022-01-21 11:19:51 +02:00
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfiguration(new MigratedScriptConfiguration());
modelBuilder.ApplyConfiguration(new MigratedVersionConfiguration());
modelBuilder.ApplyConfiguration(new MigrationSignatureConfiguration());
2022-01-21 11:19:51 +02:00
}
}
}