using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql { /// public partial class CourseAdjustmentOccurrences : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "SourceClassroomId", table: "CourseAdjustments", type: "char(36)", nullable: true); migrationBuilder.AddColumn( name: "SourceDate", table: "CourseAdjustments", type: "date", nullable: true); migrationBuilder.AddColumn( name: "SourcePeriodCount", table: "CourseAdjustments", type: "int", nullable: true); migrationBuilder.AddColumn( name: "SourceScheduleEntryId", table: "CourseAdjustments", type: "char(36)", nullable: true); migrationBuilder.AddColumn( name: "SourceStartPeriod", table: "CourseAdjustments", type: "int", nullable: true); migrationBuilder.AddColumn( name: "SourceWeek", table: "CourseAdjustments", type: "int", nullable: true); migrationBuilder.CreateIndex( name: "IX_CourseAdjustments_SourceScheduleEntryId_SourceWeek", table: "CourseAdjustments", columns: new[] { "SourceScheduleEntryId", "SourceWeek" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropIndex( name: "IX_CourseAdjustments_SourceScheduleEntryId_SourceWeek", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourceClassroomId", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourceDate", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourcePeriodCount", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourceScheduleEntryId", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourceStartPeriod", table: "CourseAdjustments"); migrationBuilder.DropColumn( name: "SourceWeek", table: "CourseAdjustments"); } } }