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( name: "ActivitiesId", table: "Ai_SportsTestData", type: "int", nullable: true, comment: "Ai赛场Id"); migrationBuilder.AddColumn( name: "FileName", table: "Ai_SportsTestData", type: "nvarchar(2000)", nullable: true, comment: "文件名称"); migrationBuilder.AddColumn( name: "FileUrl", table: "Ai_SportsTestData", type: "nvarchar(2000)", nullable: true, comment: "文件路径"); migrationBuilder.AddColumn( 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( 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"); } } }