using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace FlexJobApi.Database.Migrations.Migrations.LogDb { /// public partial class Update0810 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ScheduleJobDetail"); migrationBuilder.DropTable( name: "ScheduleJobTriggers"); migrationBuilder.CreateTable( name: "ScheduleJobTriggerTimeline", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), JobId = table.Column(type: "nvarchar(max)", nullable: true), TriggerId = table.Column(type: "nvarchar(max)", nullable: true), NumberOfRuns = table.Column(type: "bigint", nullable: false), LastRunTime = table.Column(type: "datetime2", nullable: true), NextRunTime = table.Column(type: "datetime2", nullable: true), Status = table.Column(type: "bigint", nullable: false), Result = table.Column(type: "nvarchar(max)", nullable: true), ElapsedTime = table.Column(type: "bigint", nullable: false), Mode = table.Column(type: "int", nullable: false), Exception = 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_ScheduleJobTriggerTimeline", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ScheduleJobTriggerTimeline"); migrationBuilder.CreateTable( name: "ScheduleJobDetail", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), AssemblyName = table.Column(type: "nvarchar(max)", nullable: true), Concurrent = table.Column(type: "bit", nullable: false), CreatedEnterpriseId = table.Column(type: "uniqueidentifier", nullable: true), CreatedTime = table.Column(type: "datetimeoffset", nullable: false), CreatedUserId = table.Column(type: "uniqueidentifier", nullable: true), Description = table.Column(type: "nvarchar(max)", nullable: true), GroupName = table.Column(type: "nvarchar(max)", nullable: true), IncludeAnnotations = table.Column(type: "bit", nullable: false), IsDeleted = table.Column(type: "bit", nullable: false), JobId = table.Column(type: "nvarchar(max)", nullable: true), JobType = table.Column(type: "nvarchar(max)", nullable: true), Properties = table.Column(type: "nvarchar(max)", nullable: true), Sort = table.Column(type: "int", nullable: false), TraceId = table.Column(type: "nvarchar(max)", nullable: true), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true), UpdatedUserId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_ScheduleJobDetail", x => x.Id); }); migrationBuilder.CreateTable( name: "ScheduleJobTriggers", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Args = table.Column(type: "nvarchar(max)", nullable: true), AssemblyName = table.Column(type: "nvarchar(max)", nullable: true), CreatedEnterpriseId = table.Column(type: "uniqueidentifier", nullable: true), CreatedTime = table.Column(type: "datetimeoffset", nullable: false), CreatedUserId = table.Column(type: "uniqueidentifier", nullable: true), Description = table.Column(type: "nvarchar(max)", nullable: true), ElapsedTime = table.Column(type: "bigint", nullable: false), EndTime = table.Column(type: "datetime2", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false), JobId = table.Column(type: "nvarchar(max)", nullable: true), LastRunTime = table.Column(type: "datetime2", nullable: true), MaxNumberOfErrors = table.Column(type: "bigint", nullable: false), MaxNumberOfRuns = table.Column(type: "bigint", nullable: false), NextRunTime = table.Column(type: "datetime2", nullable: true), NumRetries = table.Column(type: "bigint", nullable: false), NumberOfErrors = table.Column(type: "bigint", nullable: false), NumberOfRuns = table.Column(type: "bigint", nullable: false), ResetOnlyOnce = table.Column(type: "bit", nullable: false), Result = table.Column(type: "nvarchar(max)", nullable: true), RetryTimeout = table.Column(type: "int", nullable: false), RunOnStart = table.Column(type: "bit", nullable: false), Sort = table.Column(type: "int", nullable: false), StartNow = table.Column(type: "bit", nullable: false), StartTime = table.Column(type: "datetime2", nullable: true), Status = table.Column(type: "bigint", nullable: false), TraceId = table.Column(type: "nvarchar(max)", nullable: true), TriggerId = table.Column(type: "nvarchar(max)", nullable: true), TriggerType = table.Column(type: "nvarchar(max)", nullable: true), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true), UpdatedUserId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_ScheduleJobTriggers", x => x.Id); }); } } }