Files
Academic-Affairs-System/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20260809112000_AllowAllScheduledExperimentLessons.cs
T
biss 97aa23bc64 同学期、同课程、同教学班的实验项目合并展示,组内连续排列。
管理列表改为数据库筛选、按教学任务服务端分页(10–100 条/页)。
增加开课学院、课程名称/编码、教学班、任课教师、教学任务号筛选。
增加当前页草稿项目的批量选中、批量发布、批量删除;后端会再次校验权限、状态和发布条件。
确认框改为固定居中白色底板与阴影,不再出现只有文字按钮、没有底色的情况。
2026-08-09 19:44:45 +08:00

46 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql;
public partial class AllowAllScheduledExperimentLessons : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
// MySQL 可能将旧唯一索引用于外键支撑。先提供同列的普通索引,
// 再替换业务唯一索引,避免线上迁移因外键依赖而中断。
migrationBuilder.CreateIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code_FkSupport",
table: "ExperimentProjects",
columns: new[] { "TeachingTaskId", "Code" });
migrationBuilder.DropIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code",
table: "ExperimentProjects");
migrationBuilder.CreateIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code_ScheduleEntryId",
table: "ExperimentProjects",
columns: new[] { "TeachingTaskId", "Code", "ScheduleEntryId" },
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code_ScheduleEntryId",
table: "ExperimentProjects");
migrationBuilder.CreateIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code",
table: "ExperimentProjects",
columns: new[] { "TeachingTaskId", "Code" },
unique: true);
migrationBuilder.DropIndex(
name: "IX_ExperimentProjects_TeachingTaskId_Code_FkSupport",
table: "ExperimentProjects");
}
}