using Microsoft.EntityFrameworkCore.Migrations; using System; #nullable disable namespace VOL.Core.Migrations { public partial class init066 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Consumption", table: "Ai_TrainingData"); migrationBuilder.DropColumn( name: "Strength", table: "Ai_TrainingData"); migrationBuilder.DropColumn( name: "Consumption", table: "Ai_SportsTestData"); migrationBuilder.DropColumn( name: "Strength", table: "Ai_SportsTestData"); migrationBuilder.DropColumn( name: "Consumption", table: "Ai_LevelExamData"); migrationBuilder.DropColumn( name: "Strength", table: "Ai_LevelExamData"); migrationBuilder.DropColumn( name: "Consumption", table: "Ai_ActivitiestData"); migrationBuilder.DropColumn( name: "Strength", table: "Ai_ActivitiestData"); migrationBuilder.CreateTable( name: "Ai_ClassRoomRecord", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(200)", nullable: true, comment: "名称"), TrainingModuleEnum = table.Column(type: "int", nullable: false, comment: "训练模块枚举"), StartTime = table.Column(type: "datetime", nullable: true, comment: "开始时间"), EndTime = table.Column(type: "datetime", nullable: true, comment: "结束时间"), TeacherId = table.Column(type: "int", nullable: false, comment: "老师Id"), TeacherName = table.Column(type: "nvarchar(200)", nullable: true, comment: "老师姓名"), ParticipateCount = table.Column(type: "int", nullable: false, comment: "参与人数"), Remarks = table.Column(type: "text", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_Ai_ClassRoomRecord", x => x.Id); }); migrationBuilder.CreateTable( name: "Ai_HeartRateData", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(200)", nullable: true, comment: "名称"), StartTime = table.Column(type: "datetime", nullable: true, comment: "开始时间"), EndTime = table.Column(type: "datetime", nullable: true, comment: "结束时间"), MotionDuration = table.Column(type: "int", nullable: false, comment: "运动时长/分钟"), Consumption = table.Column(type: "int", nullable: true, comment: "运动消耗"), Strength = table.Column(type: "int", nullable: true, comment: "运动强度"), MaxValue = table.Column(type: "int", nullable: true, comment: "最大心率"), MinValue = table.Column(type: "int", nullable: true, comment: "最小心率"), AvgValue = table.Column(type: "int", nullable: true, comment: "平均心率"), Remarks = table.Column(type: "text", nullable: true, comment: "备注") }, constraints: table => { table.PrimaryKey("PK_Ai_HeartRateData", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Ai_ClassRoomRecord"); migrationBuilder.DropTable( name: "Ai_HeartRateData"); migrationBuilder.AddColumn( name: "Consumption", table: "Ai_TrainingData", type: "int", nullable: true, comment: "运动消耗"); migrationBuilder.AddColumn( name: "Strength", table: "Ai_TrainingData", type: "int", nullable: true, comment: "运动强度"); migrationBuilder.AddColumn( name: "Consumption", table: "Ai_SportsTestData", type: "int", nullable: true, comment: "运动消耗"); migrationBuilder.AddColumn( name: "Strength", table: "Ai_SportsTestData", type: "int", nullable: true, comment: "运动强度"); migrationBuilder.AddColumn( name: "Consumption", table: "Ai_LevelExamData", type: "int", nullable: true, comment: "运动消耗"); migrationBuilder.AddColumn( name: "Strength", table: "Ai_LevelExamData", type: "int", nullable: true, comment: "运动强度"); migrationBuilder.AddColumn( name: "Consumption", table: "Ai_ActivitiestData", type: "int", nullable: true, comment: "运动消耗"); migrationBuilder.AddColumn( name: "Strength", table: "Ai_ActivitiestData", type: "int", nullable: true, comment: "运动强度"); } } }