// using System; using ForumDatabase; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace ForumDatabase.Migrations { [DbContext(typeof(ForumDatabase))] [Migration("20230429151555_Init")] partial class Init { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("ForumDatabase.Models.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Categories"); }); modelBuilder.Entity("ForumDatabase.Models.Message", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Date") .HasColumnType("timestamp with time zone"); b.Property("Text") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Messages"); }); modelBuilder.Entity("ForumDatabase.Models.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Roles"); }); modelBuilder.Entity("ForumDatabase.Models.Topic", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Topics"); }); modelBuilder.Entity("ForumDatabase.Models.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Email") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.Property("RegistrationDate") .HasColumnType("timestamp with time zone"); b.Property("Username") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Users"); }); #pragma warning restore 612, 618 } } }