YD_SmartSports.Api/VOL.Core/Migrations/20240914101431_init063.cs

58 lines
2.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 init063 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Ai_TrainingDetailsData_Ai_TrainingData_TrainingDataId",
table: "Ai_TrainingDetailsData");
migrationBuilder.AlterColumn<int>(
name: "TrainingDataId",
table: "Ai_TrainingDetailsData",
type: "int",
nullable: false,
defaultValue: 0,
comment: "训练数据Id",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_Ai_TrainingDetailsData_Ai_TrainingData_TrainingDataId",
table: "Ai_TrainingDetailsData",
column: "TrainingDataId",
principalTable: "Ai_TrainingData",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Ai_TrainingDetailsData_Ai_TrainingData_TrainingDataId",
table: "Ai_TrainingDetailsData");
migrationBuilder.AlterColumn<int>(
name: "TrainingDataId",
table: "Ai_TrainingDetailsData",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldComment: "训练数据Id");
migrationBuilder.AddForeignKey(
name: "FK_Ai_TrainingDetailsData_Ai_TrainingData_TrainingDataId",
table: "Ai_TrainingDetailsData",
column: "TrainingDataId",
principalTable: "Ai_TrainingData",
principalColumn: "Id");
}
}
}