YD_SmartSports.Api/VOL.Core/Migrations/20241020110351_init084.cs

91 lines
3.0 KiB
C#
Raw Normal View History

2025-06-06 16:00:39 +08:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class init084 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Ai_SportsTestVideo_Ai_SportsTestData_SportsTestDataId",
table: "Ai_SportsTestVideo");
migrationBuilder.DropIndex(
name: "IX_Ai_SportsTestVideo_SportsTestDataId",
table: "Ai_SportsTestVideo");
migrationBuilder.DropColumn(
name: "SportsTestDataId",
table: "Ai_SportsTestVideo");
migrationBuilder.AddColumn<int>(
name: "ActivitiesId",
table: "Ai_SportsTestData",
type: "int",
nullable: true,
comment: "Ai赛场Id");
migrationBuilder.AddColumn<string>(
name: "FileName",
table: "Ai_SportsTestData",
type: "nvarchar(2000)",
nullable: true,
comment: "文件名称");
migrationBuilder.AddColumn<string>(
name: "FileUrl",
table: "Ai_SportsTestData",
type: "nvarchar(2000)",
nullable: true,
comment: "文件路径");
migrationBuilder.AddColumn<int>(
name: "TrainingModule",
table: "Ai_SportsTestData",
type: "int",
nullable: false,
defaultValue: 0,
comment: "训练模块[[1:专项教学/2:测评考级/3:AI赛场/4:AI体测]");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ActivitiesId",
table: "Ai_SportsTestData");
migrationBuilder.DropColumn(
name: "FileName",
table: "Ai_SportsTestData");
migrationBuilder.DropColumn(
name: "FileUrl",
table: "Ai_SportsTestData");
migrationBuilder.DropColumn(
name: "TrainingModule",
table: "Ai_SportsTestData");
migrationBuilder.AddColumn<int>(
name: "SportsTestDataId",
table: "Ai_SportsTestVideo",
type: "int",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Ai_SportsTestVideo_SportsTestDataId",
table: "Ai_SportsTestVideo",
column: "SportsTestDataId");
migrationBuilder.AddForeignKey(
name: "FK_Ai_SportsTestVideo_Ai_SportsTestData_SportsTestDataId",
table: "Ai_SportsTestVideo",
column: "SportsTestDataId",
principalTable: "Ai_SportsTestData",
principalColumn: "Id");
}
}
}