58 lines
2.0 KiB
C#
58 lines
2.0 KiB
C#
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");
|
|
}
|
|
}
|
|
} |