using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace FlexJobApi.Database.Migrations.Migrations { /// public partial class UpdateUser0812004 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CheckReceiveStatus", table: "TaskInfoUser", type: "int", nullable: true); migrationBuilder.AddColumn( name: "CheckReceiveTime", table: "TaskInfoUser", type: "datetime2", nullable: true); migrationBuilder.CreateTable( name: "TaskInfoUserSubmit", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TaskInfoUserId = table.Column(type: "uniqueidentifier", nullable: false), CheckReceiveStatus = table.Column(type: "int", nullable: false), CreatedTime = table.Column(type: "datetimeoffset", nullable: false), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true), Sort = table.Column(type: "int", nullable: false), TraceId = table.Column(type: "nvarchar(max)", nullable: true), CreatedUserId = table.Column(type: "uniqueidentifier", nullable: true), CreatedEnterpriseId = table.Column(type: "uniqueidentifier", nullable: true), UpdatedUserId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TaskInfoUserSubmit", x => x.Id); table.ForeignKey( name: "FK_TaskInfoUserSubmit_TaskInfoUser_TaskInfoUserId", column: x => x.TaskInfoUserId, principalTable: "TaskInfoUser", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "TaskInfoUserSubmitFile", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), SubmitId = table.Column(type: "uniqueidentifier", nullable: false), File = table.Column(type: "nvarchar(max)", nullable: false), CreatedTime = table.Column(type: "datetimeoffset", nullable: false), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true), Sort = table.Column(type: "int", nullable: false), TraceId = table.Column(type: "nvarchar(max)", nullable: true), CreatedUserId = table.Column(type: "uniqueidentifier", nullable: true), CreatedEnterpriseId = table.Column(type: "uniqueidentifier", nullable: true), UpdatedUserId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TaskInfoUserSubmitFile", x => x.Id); table.ForeignKey( name: "FK_TaskInfoUserSubmitFile_TaskInfoUserSubmit_SubmitId", column: x => x.SubmitId, principalTable: "TaskInfoUserSubmit", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_TaskInfoUserSubmit_TaskInfoUserId", table: "TaskInfoUserSubmit", column: "TaskInfoUserId"); migrationBuilder.CreateIndex( name: "IX_TaskInfoUserSubmitFile_SubmitId", table: "TaskInfoUserSubmitFile", column: "SubmitId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "TaskInfoUserSubmitFile"); migrationBuilder.DropTable( name: "TaskInfoUserSubmit"); migrationBuilder.DropColumn( name: "CheckReceiveStatus", table: "TaskInfoUser"); migrationBuilder.DropColumn( name: "CheckReceiveTime", table: "TaskInfoUser"); } } }