using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BookStore.Migrations { public partial class Add_Books : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Books", columns: table => new { Id = table.Column(type: "uuid", nullable: false), BookName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, comment: "书籍名称"), Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, comment: "描述") }, constraints: table => { table.PrimaryKey("PK_Books", x => x.Id); }, comment: "书籍"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Books"); } } }