152 lines
6.1 KiB
C#
152 lines
6.1 KiB
C#
![]() |
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<int>(type: "int", nullable: false, comment: "Id")
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
Name = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "名称"),
|
|||
|
TrainingModuleEnum = table.Column<int>(type: "int", nullable: false, comment: "训练模块枚举"),
|
|||
|
StartTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
|
|||
|
EndTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
|
|||
|
TeacherId = table.Column<int>(type: "int", nullable: false, comment: "老师Id"),
|
|||
|
TeacherName = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "老师姓名"),
|
|||
|
ParticipateCount = table.Column<int>(type: "int", nullable: false, comment: "参与人数"),
|
|||
|
Remarks = table.Column<string>(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<int>(type: "int", nullable: false, comment: "Id")
|
|||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|||
|
Name = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "名称"),
|
|||
|
StartTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
|
|||
|
EndTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
|
|||
|
MotionDuration = table.Column<int>(type: "int", nullable: false, comment: "运动时长/分钟"),
|
|||
|
Consumption = table.Column<int>(type: "int", nullable: true, comment: "运动消耗"),
|
|||
|
Strength = table.Column<int>(type: "int", nullable: true, comment: "运动强度"),
|
|||
|
MaxValue = table.Column<int>(type: "int", nullable: true, comment: "最大心率"),
|
|||
|
MinValue = table.Column<int>(type: "int", nullable: true, comment: "最小心率"),
|
|||
|
AvgValue = table.Column<int>(type: "int", nullable: true, comment: "平均心率"),
|
|||
|
Remarks = table.Column<string>(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<int>(
|
|||
|
name: "Consumption",
|
|||
|
table: "Ai_TrainingData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动消耗");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Strength",
|
|||
|
table: "Ai_TrainingData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动强度");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Consumption",
|
|||
|
table: "Ai_SportsTestData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动消耗");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Strength",
|
|||
|
table: "Ai_SportsTestData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动强度");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Consumption",
|
|||
|
table: "Ai_LevelExamData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动消耗");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Strength",
|
|||
|
table: "Ai_LevelExamData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动强度");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Consumption",
|
|||
|
table: "Ai_ActivitiestData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动消耗");
|
|||
|
|
|||
|
migrationBuilder.AddColumn<int>(
|
|||
|
name: "Strength",
|
|||
|
table: "Ai_ActivitiestData",
|
|||
|
type: "int",
|
|||
|
nullable: true,
|
|||
|
comment: "运动强度");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|