// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace song_of_the_day.DataMigrations { [DbContext(typeof(DataContext))] [Migration("20250414161136_Update user properties")] partial class Updateuserproperties { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Song", b => { b.Property("SongId") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("SongId")); b.Property("Artist") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Url") .IsRequired() .HasColumnType("text"); b.HasKey("SongId"); b.ToTable("Songs"); }); modelBuilder.Entity("SongSuggestion", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Date") .HasColumnType("timestamp with time zone"); b.Property("SongId") .HasColumnType("integer"); b.Property("UserId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("SongId"); b.HasIndex("UserId"); b.ToTable("SongSuggestions"); }); modelBuilder.Entity("User", b => { b.Property("UserId") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserId")); b.Property("IsIntroduced") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NickName") .IsRequired() .HasColumnType("text"); b.Property("SignalMemberId") .IsRequired() .HasColumnType("text"); b.HasKey("UserId"); b.ToTable("Users"); }); modelBuilder.Entity("SongSuggestion", b => { b.HasOne("Song", "Song") .WithMany() .HasForeignKey("SongId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Song"); b.Navigation("User"); }); #pragma warning restore 612, 618 } } }