YD_SmartSports.Api/VOL.Core/Migrations/20240814075324_init032.cs
2025-06-06 16:00:39 +08:00

242 lines
8.0 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using System;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class init032 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "Bmi",
table: "I_SportsTestData",
type: "float",
nullable: true,
comment: "Bmi",
oldClrType: typeof(double),
oldType: "double",
oldNullable: true,
oldComment: "Bmi");
migrationBuilder.AlterColumn<double>(
name: "WrongResults",
table: "Ai_Result",
type: "float",
nullable: true,
comment: "错误成绩",
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn<long>(
name: "UniqueId",
table: "Ai_Result",
type: "bigint",
nullable: false,
comment: "设备上传成绩时唯一标识, 重复时服务端不保存数据",
oldClrType: typeof(long),
oldType: "bigint");
migrationBuilder.AlterColumn<double>(
name: "TestResult",
table: "Ai_Result",
type: "float",
nullable: false,
comment: "成绩",
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn<int>(
name: "TeacherId",
table: "Ai_Result",
type: "int",
nullable: true,
comment: "老师Id",
oldClrType: typeof(int),
oldType: "int",
oldComment: "老师Id");
migrationBuilder.AlterColumn<string>(
name: "StudentNo",
table: "Ai_Result",
type: "nvarchar(1000)",
nullable: true,
comment: "测试的学生全国学籍号",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "Ai_Result",
type: "nvarchar(4000)",
nullable: true,
comment: "设备评价语",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ItemCode",
table: "Ai_Result",
type: "nvarchar(100)",
nullable: true,
comment: "测试项目编码",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "Duration",
table: "Ai_Result",
type: "int",
nullable: false,
comment: "持续时间",
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<string>(
name: "CorrectJudge",
table: "Ai_Result",
type: "nvarchar(4000)",
nullable: true,
comment: "动作解析",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "Bmi",
table: "I_SportsTestData",
type: "double",
nullable: true,
comment: "Bmi",
oldClrType: typeof(double),
oldType: "float",
oldNullable: true,
oldComment: "Bmi");
migrationBuilder.AlterColumn<float>(
name: "WrongResults",
table: "Ai_Result",
type: "real",
nullable: true,
oldClrType: typeof(double),
oldType: "float",
oldNullable: true,
oldComment: "错误成绩");
migrationBuilder.AlterColumn<long>(
name: "UniqueId",
table: "Ai_Result",
type: "bigint",
nullable: false,
oldClrType: typeof(long),
oldType: "bigint",
oldComment: "设备上传成绩时唯一标识, 重复时服务端不保存数据");
migrationBuilder.AlterColumn<float>(
name: "TestResult",
table: "Ai_Result",
type: "real",
nullable: false,
oldClrType: typeof(double),
oldType: "float",
oldComment: "成绩");
migrationBuilder.AlterColumn<int>(
name: "TeacherId",
table: "Ai_Result",
type: "int",
nullable: false,
defaultValue: 0,
comment: "老师Id",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true,
oldComment: "老师Id");
migrationBuilder.AlterColumn<string>(
name: "StudentNo",
table: "Ai_Result",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(1000)",
oldNullable: true,
oldComment: "测试的学生全国学籍号");
migrationBuilder.AlterColumn<string>(
name: "Remark",
table: "Ai_Result",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(4000)",
oldNullable: true,
oldComment: "设备评价语");
migrationBuilder.AlterColumn<string>(
name: "ItemCode",
table: "Ai_Result",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(100)",
oldNullable: true,
oldComment: "测试项目编码");
migrationBuilder.AlterColumn<int>(
name: "Duration",
table: "Ai_Result",
type: "int",
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldComment: "持续时间");
migrationBuilder.AlterColumn<string>(
name: "CorrectJudge",
table: "Ai_Result",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(4000)",
oldNullable: true,
oldComment: "动作解析");
migrationBuilder.AddColumn<DateTime>(
name: "CreateDate",
table: "Ai_Result",
type: "datetime",
nullable: true,
comment: "创建时间");
migrationBuilder.AddColumn<int>(
name: "Creator",
table: "Ai_Result",
type: "int)",
nullable: true,
comment: "创建人");
migrationBuilder.AddColumn<int>(
name: "Modifier",
table: "Ai_Result",
type: "int)",
nullable: true,
comment: "修改人");
migrationBuilder.AddColumn<DateTime>(
name: "ModifyDate",
table: "Ai_Result",
type: "datetime",
nullable: true,
comment: "修改时间");
}
}
}