2022-02-16 19:09:06 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
|
|
2023-01-12 01:01:36 +02:00
|
|
|
|
namespace Netmash.Infrastructure.DatabaseMigration.Entities.Configurations
|
2022-02-16 19:09:06 +02:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|