From 68b94929d44e1f4ffbee4cadc4c54cc438f6634c Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 15 Sep 2022 18:06:05 -0500 Subject: Añadir atributo título a libro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Migrations/20220915225908_AddBookTitle.Designer.cs | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Migrations/20220915225908_AddBookTitle.Designer.cs (limited to 'Migrations/20220915225908_AddBookTitle.Designer.cs') diff --git a/Migrations/20220915225908_AddBookTitle.Designer.cs b/Migrations/20220915225908_AddBookTitle.Designer.cs new file mode 100644 index 0000000..1208102 --- /dev/null +++ b/Migrations/20220915225908_AddBookTitle.Designer.cs @@ -0,0 +1,60 @@ +// +using System; +using LibraryAPI.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace LibraryAPI.Migrations +{ + [DbContext(typeof(LibraryContext))] + [Migration("20220915225908_AddBookTitle")] + partial class AddBookTitle + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.9") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("LibraryAPI.Models.Book", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Edition") + .HasColumnType("integer"); + + b.Property("Genres") + .IsRequired() + .HasColumnType("text[]"); + + b.Property("ISBN") + .IsRequired() + .HasColumnType("text"); + + b.Property("PublicationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Title") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Books"); + }); +#pragma warning restore 612, 618 + } + } +} -- cgit v1.2.3