// using System; using DeepDrftData.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DeepDrftData.Migrations { [DbContext(typeof(DeepDrftContext))] [Migration("20260611164537_NormalizeReleaseTrack")] partial class NormalizeReleaseTrack { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.7") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("DeepDrftModels.Entities.ReleaseEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Artist") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("artist"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("CreatedByUserId") .HasColumnType("bigint") .HasColumnName("created_by_user_id"); b.Property("Genre") .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("genre"); b.Property("ImagePath") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasColumnName("image_path"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("ReleaseDate") .HasColumnType("date") .HasColumnName("release_date"); b.Property("ReleaseType") .IsRequired() .ValueGeneratedOnAdd() .HasMaxLength(20) .HasColumnType("character varying(20)") .HasDefaultValue("Single") .HasColumnName("release_type"); b.Property("Title") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("title"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id"); b.HasIndex("IsDeleted") .HasDatabaseName("IX_release_is_deleted"); b.ToTable("release", (string)null); }); modelBuilder.Entity("DeepDrftModels.Entities.TrackEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("EntryKey") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)") .HasColumnName("entry_key"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("is_deleted"); b.Property("OriginalFileName") .HasMaxLength(500) .HasColumnType("character varying(500)") .HasColumnName("original_file_name"); b.Property("ReleaseId") .HasColumnType("bigint") .HasColumnName("release_id"); b.Property("TrackName") .IsRequired() .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("track_name"); b.Property("TrackNumber") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasDefaultValue(1) .HasColumnName("track_number"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id"); b.HasIndex("IsDeleted") .HasDatabaseName("IX_track_is_deleted"); b.HasIndex("ReleaseId"); b.ToTable("track", (string)null); }); modelBuilder.Entity("DeepDrftModels.Entities.TrackEntity", b => { b.HasOne("DeepDrftModels.Entities.ReleaseEntity", "Release") .WithMany("Tracks") .HasForeignKey("ReleaseId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("Release"); }); modelBuilder.Entity("DeepDrftModels.Entities.ReleaseEntity", b => { b.Navigation("Tracks"); }); #pragma warning restore 612, 618 } } }