// using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Pgvector; using TeamUp.Modules.Skills.Persistence; #nullable disable namespace TeamUp.Modules.Skills.Persistence.Migrations { [DbContext(typeof(SkillsDbContext))] [Migration("20260610180442_AddSkillOwnership")] partial class AddSkillOwnership { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("skills") .HasAnnotation("ProductVersion", "10.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("TeamUp.Modules.Skills.Domain.Skill", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AuthoredByMemberId") .HasColumnType("uuid"); b.Property("Body") .IsRequired() .HasColumnType("text"); b.Property("ContentHash") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)"); b.PrimitiveCollection>("Context") .IsRequired() .HasColumnType("text[]"); b.Property("Embedding") .HasColumnType("vector(384)"); b.Property("IndexedAtUtc") .HasColumnType("timestamp with time zone"); b.Property("Inputs") .HasMaxLength(2000) .HasColumnType("character varying(2000)"); b.Property("MinTier") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)"); b.Property("OrganizationId") .HasColumnType("uuid"); b.Property("Origin") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("Outputs") .HasMaxLength(2000) .HasColumnType("character varying(2000)"); b.PrimitiveCollection>("Roles") .IsRequired() .HasColumnType("text[]"); b.Property("SkillKey") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("SourceCommit") .HasColumnType("text"); b.Property("SourcePath") .HasColumnType("text"); b.Property("SourceRepo") .HasColumnType("text"); b.Property("Status") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.Property("Summary") .HasMaxLength(1000) .HasColumnType("character varying(1000)"); b.PrimitiveCollection>("Tools") .IsRequired() .HasColumnType("text[]"); b.Property("UpdatedAtUtc") .HasColumnType("timestamp with time zone"); b.Property("Version") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("Visibility") .IsRequired() .HasMaxLength(20) .HasColumnType("character varying(20)"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.HasIndex("Status"); b.HasIndex("OrganizationId", "SkillKey", "Version") .IsUnique(); NpgsqlIndexBuilderExtensions.AreNullsDistinct(b.HasIndex("OrganizationId", "SkillKey", "Version"), false); b.ToTable("skills", "skills"); }); modelBuilder.Entity("TeamUp.Modules.Skills.Domain.Skill", b => { b.OwnsMany("TeamUp.Modules.Skills.Domain.GoldenExample", "GoldenTests", b1 => { b1.Property("SkillId"); b1.Property("__synthesizedOrdinal") .ValueGeneratedOnAdd(); b1.Property("Expected") .IsRequired(); b1.Property("Input") .IsRequired(); b1.HasKey("SkillId", "__synthesizedOrdinal"); b1.ToTable("skills", "skills"); b1 .ToJson("GoldenTests") .HasColumnType("jsonb"); b1.WithOwner() .HasForeignKey("SkillId"); }); b.OwnsMany("TeamUp.Modules.Skills.Domain.SkillAction", "Actions", b1 => { b1.Property("SkillId"); b1.Property("__synthesizedOrdinal") .ValueGeneratedOnAdd(); b1.Property("Description"); b1.Property("Name") .IsRequired(); b1.Property("Risk"); b1.HasKey("SkillId", "__synthesizedOrdinal"); b1.ToTable("skills", "skills"); b1 .ToJson("Actions") .HasColumnType("jsonb"); b1.WithOwner() .HasForeignKey("SkillId"); }); b.Navigation("Actions"); b.Navigation("GoldenTests"); }); #pragma warning restore 612, 618 } } }