YD_SmartSports.Api/VOL.Core/Migrations/20240918071613_init069.cs

44 lines
1.8 KiB
C#
Raw Permalink Normal View History

2025-06-06 16:00:39 +08:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class init069 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Ai_SportsTestVideo",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
Type = table.Column<int>(type: "int", nullable: false, comment: "文件类型"),
Size = table.Column<int>(type: "int", nullable: false, comment: "文件的大小"),
Url = table.Column<string>(type: "nvarchar(2000)", nullable: true, comment: "文件的链接地址"),
SportsTestDataId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Ai_SportsTestVideo", x => x.Id);
table.ForeignKey(
name: "FK_Ai_SportsTestVideo_Ai_SportsTestData_SportsTestDataId",
column: x => x.SportsTestDataId,
principalTable: "Ai_SportsTestData",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_Ai_SportsTestVideo_SportsTestDataId",
table: "Ai_SportsTestVideo",
column: "SportsTestDataId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Ai_SportsTestVideo");
}
}
}