
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 30s
- 添加学生提交管理服务 (StudentSubmissionService, StudentSubmissionDetailService) - 新增学生提交相关控制器 (StudentSubmissionController, StudentSubmissionDetailController) - 添加学生提交数据传输对象 (StudentSubmissionDetailDto, StudentSubmissionSummaryDto) - 新增学生提交相关页面组件 (StudentExamView, ExamDetailView, StudentCard等) - 添加学生提交信息卡片组件 (SubmissionInfoCard, TeacherSubmissionInfoCard) - 更新数据库迁移文件以支持提交系统
98 lines
3.5 KiB
C#
98 lines
3.5 KiB
C#
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 submission_up_2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("2670f35a-df0c-4071-8879-80eb99d138a1"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("8c6c5e8e-ef00-444c-9c7c-cba5cd6f7043"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("9eda9d90-0cd2-4fbe-b07e-f90bd01f32db"));
|
|
|
|
migrationBuilder.AlterColumn<float>(
|
|
name: "overall_grade",
|
|
table: "submissions",
|
|
type: "float",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0f,
|
|
oldClrType: typeof(float),
|
|
oldType: "float",
|
|
oldPrecision: 5,
|
|
oldScale: 2,
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "AspNetRoles",
|
|
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("264e4290-9d15-478d-8c49-8d0935e5a6e1"), null, "Administrator", "ADMINISTRATOR" },
|
|
{ new Guid("73cafcee-3e99-43ae-86c5-c01a1cbc6124"), null, "Teacher", "TEACHER" },
|
|
{ new Guid("f06927ff-4bba-4ab6-8f0a-e45a765c2fcc"), null, "Student", "STUDENT" }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("264e4290-9d15-478d-8c49-8d0935e5a6e1"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("73cafcee-3e99-43ae-86c5-c01a1cbc6124"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("f06927ff-4bba-4ab6-8f0a-e45a765c2fcc"));
|
|
|
|
migrationBuilder.AlterColumn<float>(
|
|
name: "overall_grade",
|
|
table: "submissions",
|
|
type: "float",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: true,
|
|
oldClrType: typeof(float),
|
|
oldType: "float",
|
|
oldPrecision: 5,
|
|
oldScale: 2);
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "AspNetRoles",
|
|
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("2670f35a-df0c-4071-8879-80eb99d138a1"), null, "Teacher", "TEACHER" },
|
|
{ new Guid("8c6c5e8e-ef00-444c-9c7c-cba5cd6f7043"), null, "Student", "STUDENT" },
|
|
{ new Guid("9eda9d90-0cd2-4fbe-b07e-f90bd01f32db"), null, "Administrator", "ADMINISTRATOR" }
|
|
});
|
|
}
|
|
}
|
|
}
|