YD_SmartSports.Api/VOL.Core/Migrations/20250721065806_20250721v1.cs

38 lines
1.5 KiB
C#
Raw Permalink Normal View History

2025-07-21 17:06:17 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20250721v1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Y_CurricularPurchaseRecord",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
UserId = table.Column<int>(type: "int", nullable: false, comment: "用户Id"), // ✅ 修复
TaxonomyId = table.Column<int>(type: "int", nullable: false, comment: "分类Id"), // ✅ 修复
RedeemCode = table.Column<string>(type: "nvarchar(1000)", nullable: true, comment: "兑换码"),
Remarks = table.Column<string>(type: "text", nullable: true, comment: "备注"),
CreateDate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "创建时间")
},
constraints: table =>
{
table.PrimaryKey("PK_Y_CurricularPurchaseRecord", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Y_CurricularPurchaseRecord");
}
}
}