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(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), UserId = table.Column(type: "int", nullable: false, comment: "用户Id"), // ✅ 修复 TaxonomyId = table.Column(type: "int", nullable: false, comment: "分类Id"), // ✅ 修复 RedeemCode = table.Column(type: "nvarchar(1000)", nullable: true, comment: "兑换码"), Remarks = table.Column(type: "text", nullable: true, comment: "备注"), CreateDate = table.Column(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"); } } }