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