
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 13s
- 重构AppMainStruct、AssignmentQuestion、Question等实体模型 - 更新相关DTO以匹配新的数据结构 - 优化前端页面布局和组件 - 添加全局信息和笔记功能相关代码 - 更新数据库迁移和程序配置
90 lines
3.5 KiB
C#
90 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 question_qt_update_2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("67de6514-79a5-4a9c-b54c-13cac296b0c6"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("94f0d8d9-ffba-4e28-b578-8596363d42ae"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("bf46ed67-2dc9-40f8-8717-37dd3572f274"));
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "global",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Area = table.Column<byte>(type: "tinyint unsigned", nullable: false),
|
|
Info = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_global", x => x.id);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "AspNetRoles",
|
|
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("49854839-b861-4d42-bdbe-96b1a66c25ef"), null, "Teacher", "TEACHER" },
|
|
{ new Guid("5c7a7971-2610-4bce-9e41-0caffd5a5558"), null, "Student", "STUDENT" },
|
|
{ new Guid("83ff7de8-edc9-47f8-8de8-22f892ca6bb5"), null, "Administrator", "ADMINISTRATOR" }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "global");
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("49854839-b861-4d42-bdbe-96b1a66c25ef"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("5c7a7971-2610-4bce-9e41-0caffd5a5558"));
|
|
|
|
migrationBuilder.DeleteData(
|
|
table: "AspNetRoles",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("83ff7de8-edc9-47f8-8de8-22f892ca6bb5"));
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "AspNetRoles",
|
|
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("67de6514-79a5-4a9c-b54c-13cac296b0c6"), null, "Teacher", "TEACHER" },
|
|
{ new Guid("94f0d8d9-ffba-4e28-b578-8596363d42ae"), null, "Student", "STUDENT" },
|
|
{ new Guid("bf46ed67-2dc9-40f8-8717-37dd3572f274"), null, "Administrator", "ADMINISTRATOR" }
|
|
});
|
|
}
|
|
}
|
|
}
|