using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace LibraryAPI.Migrations { public partial class InitialCreate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Books", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), PublicationDate = table.Column(type: "timestamp with time zone", nullable: false), Genres = table.Column(type: "text[]", nullable: false), Edition = table.Column(type: "integer", nullable: false), ISBN = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Books", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Books"); } } }