YD_SmartSports.Api/VOL.Core/Migrations/20250403034350_20250403v1.cs
2025-06-06 16:55:14 +08:00

71 lines
2.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20250403v1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_XW_TrainStudents_XW_SportsTestData_XW_SportsTestDataId",
table: "XW_TrainStudents");
migrationBuilder.DropColumn(
name: "StadiumCode",
table: "Y_StadiumVisiting");
migrationBuilder.AddColumn<int>(
name: "StadiumId",
table: "Y_StadiumVisiting",
type: "int",
nullable: false,
defaultValue: 0,
comment: "场馆Id");
migrationBuilder.AlterColumn<double>(
name: "Longitude",
table: "Y_Stadium",
type: "float",
nullable: true,
comment: "经度",
oldClrType: typeof(double),
oldType: "float",
oldComment: "经度");
migrationBuilder.AlterColumn<double>(
name: "Latitude",
table: "Y_Stadium",
type: "float",
nullable: true,
comment: "纬度",
oldClrType: typeof(double),
oldType: "float",
oldComment: "纬度");
migrationBuilder.AlterColumn<int>(
name: "XW_SportsTestDataId",
table: "XW_TrainStudents",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_XW_TrainStudents_XW_SportsTestData_XW_SportsTestDataId",
table: "XW_TrainStudents",
column: "XW_SportsTestDataId",
principalTable: "XW_SportsTestData",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}