// using System; using 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 Data.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20241029070533_Init")] partial class Init { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Models.Manufacturer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.HasKey("Id"); b.ToTable("Manufacturers"); }); modelBuilder.Entity("Models.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("DeliveryDate") .HasColumnType("date"); b.Property("Image") .IsRequired() .HasColumnType("bytea"); b.Property("ManufacturerName") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("character varying(100)"); b.HasKey("Id"); b.ToTable("Products"); }); #pragma warning restore 612, 618 } } }