52 lines
2.0 KiB
C#
52 lines
2.0 KiB
C#
![]() |
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace YD_WeChatApplet.Api.Migrations
|
|||
|
{
|
|||
|
public partial class _20250226v1 : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "WCA_Category",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
CategoryValue = table.Column<int>(type: "int", nullable: false, comment: "类别枚举值"),
|
|||
|
CategoryName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "类别中文名称"),
|
|||
|
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "类别枚举名称"),
|
|||
|
Remarks = table.Column<string>(type: "text", nullable: false, comment: "备注")
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_WCA_Category", x => x.Id);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "WCA_Week",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
Name = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "Name"),
|
|||
|
Remarks = table.Column<string>(type: "text", nullable: false, comment: "备注")
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_WCA_Week", x => x.Id);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "WCA_Category");
|
|||
|
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "WCA_Week");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|