This commit is contained in:
1263
TechHelper.Server/Migrations/20250828025055_score_in_submission.Designer.cs
generated
Normal file
1263
TechHelper.Server/Migrations/20250828025055_score_in_submission.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace TechHelper.Server.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class score_in_submission : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("379143a2-8d7f-4ef7-b7c0-14701b710f87"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("6d49bb08-97d6-4a38-88a7-8080925b589b"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e330c745-f422-43e3-bcdf-1439ace3c52f"));
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ErrorQuesNum",
|
||||
table: "submissions",
|
||||
type: "tinyint unsigned",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TotalQuesNum",
|
||||
table: "submissions",
|
||||
type: "tinyint unsigned",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TotalScore",
|
||||
table: "submissions",
|
||||
type: "tinyint unsigned",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "AspNetRoles",
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("53307917-63c4-468a-ab05-a03882a69ef8"), null, "Teacher", "TEACHER" },
|
||||
{ new Guid("789b7819-685f-4a2b-9adf-463f397f24d1"), null, "Administrator", "ADMINISTRATOR" },
|
||||
{ new Guid("bbea7915-e27c-4ddc-b06c-1f579fc8104e"), null, "Student", "STUDENT" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("53307917-63c4-468a-ab05-a03882a69ef8"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("789b7819-685f-4a2b-9adf-463f397f24d1"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("bbea7915-e27c-4ddc-b06c-1f579fc8104e"));
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ErrorQuesNum",
|
||||
table: "submissions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TotalQuesNum",
|
||||
table: "submissions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TotalScore",
|
||||
table: "submissions");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "AspNetRoles",
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("379143a2-8d7f-4ef7-b7c0-14701b710f87"), null, "Administrator", "ADMINISTRATOR" },
|
||||
{ new Guid("6d49bb08-97d6-4a38-88a7-8080925b589b"), null, "Student", "STUDENT" },
|
||||
{ new Guid("e330c745-f422-43e3-bcdf-1439ace3c52f"), null, "Teacher", "TEACHER" }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
1270
TechHelper.Server/Migrations/20250829043403_up_assign_data.Designer.cs
generated
Normal file
1270
TechHelper.Server/Migrations/20250829043403_up_assign_data.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace TechHelper.Server.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class up_assign_data : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("53307917-63c4-468a-ab05-a03882a69ef8"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("789b7819-685f-4a2b-9adf-463f397f24d1"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("bbea7915-e27c-4ddc-b06c-1f579fc8104e"));
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ExamType",
|
||||
table: "assignments",
|
||||
type: "tinyint unsigned",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "assignments",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "AspNetRoles",
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("0775702a-5db7-4747-94d0-4376fad2b58b"), null, "Teacher", "TEACHER" },
|
||||
{ new Guid("37f41430-0cb7-44e5-988b-976200bd602d"), null, "Administrator", "ADMINISTRATOR" },
|
||||
{ new Guid("df89b9a0-65ef-42dd-b2cb-e59997a72e70"), null, "Student", "STUDENT" }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("0775702a-5db7-4747-94d0-4376fad2b58b"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("37f41430-0cb7-44e5-988b-976200bd602d"));
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "AspNetRoles",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("df89b9a0-65ef-42dd-b2cb-e59997a72e70"));
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ExamType",
|
||||
table: "assignments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Name",
|
||||
table: "assignments");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "AspNetRoles",
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ new Guid("53307917-63c4-468a-ab05-a03882a69ef8"), null, "Teacher", "TEACHER" },
|
||||
{ new Guid("789b7819-685f-4a2b-9adf-463f397f24d1"), null, "Administrator", "ADMINISTRATOR" },
|
||||
{ new Guid("bbea7915-e27c-4ddc-b06c-1f579fc8104e"), null, "Student", "STUDENT" }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@@ -50,10 +50,17 @@ namespace TechHelper.Server.Migrations
|
||||
.HasColumnType("char(36)")
|
||||
.HasColumnName("exam_struct_id");
|
||||
|
||||
b.Property<byte>("ExamType")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasColumnName("deleted");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<float>("Score")
|
||||
.HasColumnType("float")
|
||||
.HasColumnName("score");
|
||||
@@ -504,6 +511,9 @@ namespace TechHelper.Server.Migrations
|
||||
.HasColumnType("tinyint unsigned")
|
||||
.HasColumnName("attempt_number");
|
||||
|
||||
b.Property<byte>("ErrorQuesNum")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<DateTime?>("GradedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("graded_at");
|
||||
@@ -540,6 +550,12 @@ namespace TechHelper.Server.Migrations
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("submission_time");
|
||||
|
||||
b.Property<byte>("TotalQuesNum")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.Property<byte>("TotalScore")
|
||||
.HasColumnType("tinyint unsigned");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AssignmentId");
|
||||
@@ -755,19 +771,19 @@ namespace TechHelper.Server.Migrations
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = new Guid("6d49bb08-97d6-4a38-88a7-8080925b589b"),
|
||||
Id = new Guid("df89b9a0-65ef-42dd-b2cb-e59997a72e70"),
|
||||
Name = "Student",
|
||||
NormalizedName = "STUDENT"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("e330c745-f422-43e3-bcdf-1439ace3c52f"),
|
||||
Id = new Guid("0775702a-5db7-4747-94d0-4376fad2b58b"),
|
||||
Name = "Teacher",
|
||||
NormalizedName = "TEACHER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("379143a2-8d7f-4ef7-b7c0-14701b710f87"),
|
||||
Id = new Guid("37f41430-0cb7-44e5-988b-976200bd602d"),
|
||||
Name = "Administrator",
|
||||
NormalizedName = "ADMINISTRATOR"
|
||||
});
|
||||
|
Reference in New Issue
Block a user