121 lines
4.4 KiB
C#
121 lines
4.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using System;
|
|
|
|
#nullable disable
|
|
|
|
namespace VOL.Core.Migrations
|
|
{
|
|
public partial class init03 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "Modifier",
|
|
table: "Ai_Result",
|
|
type: "int)",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "修改人",
|
|
oldClrType: typeof(int),
|
|
oldType: "int)",
|
|
oldNullable: true,
|
|
oldComment: "修改人");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "Creator",
|
|
table: "Ai_Result",
|
|
type: "int)",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "创建人",
|
|
oldClrType: typeof(int),
|
|
oldType: "int)",
|
|
oldNullable: true,
|
|
oldComment: "创建人");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "ClassId",
|
|
table: "Ai_Result",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "班级Id");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ClassName",
|
|
table: "Ai_Result",
|
|
type: "nvarchar(100)",
|
|
nullable: true,
|
|
comment: "班级名称");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "GradeId",
|
|
table: "Ai_Result",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "年级Id");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "GradeName",
|
|
table: "Ai_Result",
|
|
type: "nvarchar(100)",
|
|
nullable: true,
|
|
comment: "年级名称");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "SchoolCode",
|
|
table: "Ai_Result",
|
|
type: "nvarchar(100)",
|
|
nullable: true,
|
|
comment: "学校Code");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "SchoolName",
|
|
table: "Ai_Result",
|
|
type: "nvarchar(100)",
|
|
nullable: true,
|
|
comment: "学校名称");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "TeacherId",
|
|
table: "Ai_Result",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "老师Id");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "TeacherName",
|
|
table: "Ai_Result",
|
|
type: "nvarchar(100)",
|
|
nullable: true,
|
|
comment: "老师姓名");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "I_SportsTest",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
ClassId = table.Column<int>(type: "int", nullable: false, comment: "班级Id"),
|
|
ClassName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "班级名称"),
|
|
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级Id"),
|
|
GradeName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "年级名称"),
|
|
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "学校Code"),
|
|
SchoolName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "学校名称"),
|
|
ScoreTime = table.Column<DateTime>(type: "datetime", nullable: false, comment: "提交时间"),
|
|
TeacherId = table.Column<int>(type: "int", nullable: true, comment: "老师Id"),
|
|
TeacherName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "老师姓名")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_I_SportsTest", x => x.Id);
|
|
});
|
|
}
|
|
}
|
|
} |