You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
3 years ago
|
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<Guid>(type: "uuid", nullable: false),
|
||
|
BookName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false, comment: "书籍名称"),
|
||
|
Description = table.Column<string>(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");
|
||
|
}
|
||
|
}
|
||
|
}
|