// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using RLHF.Generator.Persistence; #nullable disable namespace RLHF.Generator.Persistence.Migrations { [DbContext(typeof(RlhfGeneratorDbContext))] [Migration("20260726045229_DurableGenerationResume")] partial class DurableGenerationResume { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("RLHF.Generator.Persistence.Category", b => { b.Property("Id") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(128)"); b.HasKey("Id"); b.ToTable("Category", "dbo"); b.HasData( new { Id = 1, Name = "MEDICAL_ALLERGY" }, new { Id = 2, Name = "MEDICAL_DIAGNOSIS" }, new { Id = 3, Name = "MEDICAL_FAMILY_HISTORY" }, new { Id = 4, Name = "MEDICAL_MEDICATION" }, new { Id = 5, Name = "MEDICAL_MENTAL_HEALTH" }, new { Id = 6, Name = "MEDICAL_OTHER" }, new { Id = 7, Name = "MEDICAL_PHYSICAL_HEALTH" }, new { Id = 8, Name = "MEDICAL_PROCEDURE" }, new { Id = 9, Name = "MEDICAL_SUBSTANCE_USE" }, new { Id = 10, Name = "MEDICAL_SYMPTOM" }, new { Id = 11, Name = "MEDICAL_TEST" }, new { Id = 12, Name = "MEDICAL_TREATMENT" }); }); modelBuilder.Entity("RLHF.Generator.Persistence.GenerationRun", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("CompletedAt") .HasColumnType("datetimeoffset"); b.Property("ConfigurationFingerprint") .IsRequired() .HasColumnType("char(64)"); b.Property("CurrentCategoryId") .HasColumnType("int"); b.Property("CurrentIsPositive") .HasColumnType("bit"); b.Property("FailureMessage") .HasColumnType("nvarchar(1024)"); b.Property("FailureType") .HasColumnType("nvarchar(256)"); b.Property("InputFingerprint") .IsRequired() .HasColumnType("char(64)"); b.Property("LastCheckpointAt") .HasColumnType("datetimeoffset"); b.Property("LastCommittedPlanOrdinal") .HasColumnType("bigint"); b.Property("RandomSeed") .HasColumnType("int"); b.Property("StartedAt") .HasColumnType("datetimeoffset"); b.Property("Status") .IsRequired() .HasColumnType("nvarchar(16)"); b.Property("TotalCommittedRowCount") .HasColumnType("int"); b.Property("TotalExpectedRowCount") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CurrentCategoryId"); b.HasIndex("Status"); b.ToTable("GenerationRun", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.TrainingItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CategoryId") .HasColumnType("int"); b.Property("GenerationRunId") .HasColumnType("uniqueidentifier"); b.Property("IsPositive") .HasColumnType("bit"); b.Property("PlanOrdinal") .HasColumnType("bigint"); b.Property("RecordKey") .HasColumnType("char(64)"); b.Property("Value") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("RecordKey") .IsUnique() .HasFilter("[RecordKey] IS NOT NULL"); b.HasIndex("GenerationRunId", "PlanOrdinal") .IsUnique() .HasFilter("[GenerationRunId] IS NOT NULL AND [PlanOrdinal] IS NOT NULL"); b.ToTable("TrainingItem", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.GenerationRun", b => { b.HasOne("RLHF.Generator.Persistence.Category", null) .WithMany() .HasForeignKey("CurrentCategoryId") .OnDelete(DeleteBehavior.Restrict); }); modelBuilder.Entity("RLHF.Generator.Persistence.TrainingItem", b => { b.HasOne("RLHF.Generator.Persistence.Category", null) .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("RLHF.Generator.Persistence.GenerationRun", null) .WithMany() .HasForeignKey("GenerationRunId") .OnDelete(DeleteBehavior.Restrict); }); #pragma warning restore 612, 618 } } }