using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace FlexJobApi.Database.Migrations.Migrations { /// public partial class Update0810 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Birthday", table: "User", type: "datetime2", nullable: true); migrationBuilder.CreateTable( name: "ScheduleJobDetail", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), JobId = table.Column(type: "nvarchar(max)", nullable: true), GroupName = table.Column(type: "nvarchar(max)", nullable: true), JobType = table.Column(type: "nvarchar(max)", nullable: true), AssemblyName = table.Column(type: "nvarchar(max)", nullable: true), Description = table.Column(type: "nvarchar(max)", nullable: true), Concurrent = table.Column(type: "bit", nullable: false), IncludeAnnotations = table.Column(type: "bit", nullable: false), Properties = table.Column(type: "nvarchar(max)", nullable: true), 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_ScheduleJobDetail", x => x.Id); }); migrationBuilder.CreateTable( name: "ScheduleJobTrigger", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TriggerId = table.Column(type: "nvarchar(max)", nullable: true), JobId = table.Column(type: "nvarchar(max)", nullable: true), TriggerType = table.Column(type: "nvarchar(max)", nullable: true), AssemblyName = table.Column(type: "nvarchar(max)", nullable: true), Args = table.Column(type: "nvarchar(max)", nullable: true), Description = table.Column(type: "nvarchar(max)", nullable: true), Status = table.Column(type: "bigint", nullable: false), StartTime = table.Column(type: "datetime2", nullable: true), EndTime = table.Column(type: "datetime2", nullable: true), LastRunTime = table.Column(type: "datetime2", nullable: true), NextRunTime = table.Column(type: "datetime2", nullable: true), NumberOfRuns = table.Column(type: "bigint", nullable: false), MaxNumberOfRuns = table.Column(type: "bigint", nullable: false), NumberOfErrors = table.Column(type: "bigint", nullable: false), MaxNumberOfErrors = table.Column(type: "bigint", nullable: false), NumRetries = table.Column(type: "bigint", nullable: false), RetryTimeout = table.Column(type: "int", nullable: false), StartNow = table.Column(type: "bit", nullable: false), RunOnStart = table.Column(type: "bit", nullable: false), ResetOnlyOnce = table.Column(type: "bit", nullable: false), Result = table.Column(type: "nvarchar(max)", nullable: true), ElapsedTime = table.Column(type: "bigint", 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_ScheduleJobTrigger", x => x.Id); }); migrationBuilder.UpdateData( table: "User", keyColumn: "Id", keyValue: new Guid("11111111-1111-1111-1111-111111111111"), column: "Birthday", value: null); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ScheduleJobDetail"); migrationBuilder.DropTable( name: "ScheduleJobTrigger"); migrationBuilder.DropColumn( name: "Birthday", table: "User"); } } }