16 lines
625 B
C#
16 lines
625 B
C#
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|||
|
|
|||
|
namespace Netmash.Infrastructure.DatabaseMigration.Entities.Configurations
|
|||
|
{
|
|||
|
internal class MigrationSignatureConfiguration : IEntityTypeConfiguration<MigrationSignature>
|
|||
|
{
|
|||
|
public void Configure(EntityTypeBuilder<MigrationSignature> builder)
|
|||
|
{
|
|||
|
builder.ToTable("MigrationSignature", "migration").HasKey(z => z.Id);
|
|||
|
builder.Property(z => z.Id).ValueGeneratedOnAdd();
|
|||
|
builder.HasMany(z => z.MigratedVersions).WithOne().HasForeignKey(z => z.SignatureId);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|