using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations { public partial class BackgroundJobs_Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AbpBackgroundJobs", columns: table => new { Id = table.Column(nullable: false), JobName = table.Column(maxLength: 128, nullable: false), JobArgs = table.Column(maxLength: 1048576, nullable: false), TryCount = table.Column(nullable: false, defaultValue: (short)0), CreationTime = table.Column(nullable: false), NextTryTime = table.Column(nullable: false), LastTryTime = table.Column(nullable: true), IsAbandoned = table.Column(nullable: false, defaultValue: false), Priority = table.Column(nullable: false, defaultValue: (byte)15) }, constraints: table => { table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", table: "AbpBackgroundJobs", columns: new[] { "IsAbandoned", "NextTryTime" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AbpBackgroundJobs"); } } }