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( name: "Bmi", table: "I_SportsTestData", type: "float", nullable: true, comment: "Bmi", oldClrType: typeof(double), oldType: "double", oldNullable: true, oldComment: "Bmi"); migrationBuilder.AlterColumn( name: "WrongResults", table: "Ai_Result", type: "float", nullable: true, comment: "错误成绩", oldClrType: typeof(float), oldType: "real", oldNullable: true); migrationBuilder.AlterColumn( name: "UniqueId", table: "Ai_Result", type: "bigint", nullable: false, comment: "设备上传成绩时唯一标识, 重复时服务端不保存数据", oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AlterColumn( name: "TestResult", table: "Ai_Result", type: "float", nullable: false, comment: "成绩", oldClrType: typeof(float), oldType: "real"); migrationBuilder.AlterColumn( name: "TeacherId", table: "Ai_Result", type: "int", nullable: true, comment: "老师Id", oldClrType: typeof(int), oldType: "int", oldComment: "老师Id"); migrationBuilder.AlterColumn( name: "StudentNo", table: "Ai_Result", type: "nvarchar(1000)", nullable: true, comment: "测试的学生全国学籍号", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Remark", table: "Ai_Result", type: "nvarchar(4000)", nullable: true, comment: "设备评价语", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "ItemCode", table: "Ai_Result", type: "nvarchar(100)", nullable: true, comment: "测试项目编码", oldClrType: typeof(string), oldType: "nvarchar(max)", oldNullable: true); migrationBuilder.AlterColumn( name: "Duration", table: "Ai_Result", type: "int", nullable: false, comment: "持续时间", oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( 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( name: "Bmi", table: "I_SportsTestData", type: "double", nullable: true, comment: "Bmi", oldClrType: typeof(double), oldType: "float", oldNullable: true, oldComment: "Bmi"); migrationBuilder.AlterColumn( name: "WrongResults", table: "Ai_Result", type: "real", nullable: true, oldClrType: typeof(double), oldType: "float", oldNullable: true, oldComment: "错误成绩"); migrationBuilder.AlterColumn( name: "UniqueId", table: "Ai_Result", type: "bigint", nullable: false, oldClrType: typeof(long), oldType: "bigint", oldComment: "设备上传成绩时唯一标识, 重复时服务端不保存数据"); migrationBuilder.AlterColumn( name: "TestResult", table: "Ai_Result", type: "real", nullable: false, oldClrType: typeof(double), oldType: "float", oldComment: "成绩"); migrationBuilder.AlterColumn( name: "TeacherId", table: "Ai_Result", type: "int", nullable: false, defaultValue: 0, comment: "老师Id", oldClrType: typeof(int), oldType: "int", oldNullable: true, oldComment: "老师Id"); migrationBuilder.AlterColumn( name: "StudentNo", table: "Ai_Result", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(1000)", oldNullable: true, oldComment: "测试的学生全国学籍号"); migrationBuilder.AlterColumn( name: "Remark", table: "Ai_Result", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(4000)", oldNullable: true, oldComment: "设备评价语"); migrationBuilder.AlterColumn( name: "ItemCode", table: "Ai_Result", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(100)", oldNullable: true, oldComment: "测试项目编码"); migrationBuilder.AlterColumn( name: "Duration", table: "Ai_Result", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int", oldComment: "持续时间"); migrationBuilder.AlterColumn( name: "CorrectJudge", table: "Ai_Result", type: "nvarchar(max)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(4000)", oldNullable: true, oldComment: "动作解析"); migrationBuilder.AddColumn( name: "CreateDate", table: "Ai_Result", type: "datetime", nullable: true, comment: "创建时间"); migrationBuilder.AddColumn( name: "Creator", table: "Ai_Result", type: "int)", nullable: true, comment: "创建人"); migrationBuilder.AddColumn( name: "Modifier", table: "Ai_Result", type: "int)", nullable: true, comment: "修改人"); migrationBuilder.AddColumn( name: "ModifyDate", table: "Ai_Result", type: "datetime", nullable: true, comment: "修改时间"); } } }