using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql { /// public partial class ExamSignInExportJobs : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ExamSignInExportJobs", columns: table => new { Id = table.Column(type: "char(36)", nullable: false), PlanId = table.Column(type: "char(36)", nullable: false), Status = table.Column(type: "int", nullable: false), RequestedByUserId = table.Column(type: "char(36)", nullable: true), FileName = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), FileBytes = table.Column(type: "longblob", nullable: true), FileSize = table.Column(type: "int", nullable: false), CurrentStep = table.Column(type: "varchar(200)", maxLength: 200, nullable: true), ErrorMessage = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true), StartedAt = table.Column(type: "datetime(6)", nullable: true), CompletedAt = table.Column(type: "datetime(6)", nullable: true), CreatedAt = table.Column(type: "datetime(6)", nullable: false), UpdatedAt = table.Column(type: "datetime(6)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ExamSignInExportJobs", x => x.Id); }) .Annotation("MySQL:Charset", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_ExamSignInExportJobs_PlanId_CreatedAt", table: "ExamSignInExportJobs", columns: new[] { "PlanId", "CreatedAt" }); migrationBuilder.CreateIndex( name: "IX_ExamSignInExportJobs_RequestedByUserId", table: "ExamSignInExportJobs", column: "RequestedByUserId"); migrationBuilder.CreateIndex( name: "IX_ExamSignInExportJobs_Status_CreatedAt", table: "ExamSignInExportJobs", columns: new[] { "Status", "CreatedAt" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ExamSignInExportJobs"); } } }