using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace LibraryAPI.Migrations { public partial class InitialMigration : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Author", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), Country = table.Column(type: "text", nullable: true), Name = table.Column(type: "text", nullable: true), YearOfBirth = table.Column(type: "integer", nullable: false), languages = table.Column(type: "text[]", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Author", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Author"); } } }