这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

108 lines
6.2 KiB

using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.TaskManagement.Migrations
{
public partial class AddModuleTaskManagement : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TK_BackgroundJobLogs",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
JobId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
JobName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
JobGroup = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
JobType = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Message = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
RunTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Exception = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_TK_BackgroundJobLogs", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TK_BackgroundJobs",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Group = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Type = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Args = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<int>(type: "int", nullable: false),
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
Description = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LockTimeOut = table.Column<int>(type: "int", nullable: false),
BeginTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
EndTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastRunTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
NextRunTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
Cron = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Priority = table.Column<int>(type: "int", nullable: false),
TriggerCount = table.Column<int>(type: "int", nullable: false),
TryCount = table.Column<int>(type: "int", nullable: false),
MaxTryCount = table.Column<int>(type: "int", nullable: false),
MaxCount = table.Column<int>(type: "int", nullable: false),
Interval = table.Column<int>(type: "int", nullable: false),
IsAbandoned = table.Column<bool>(type: "tinyint(1)", nullable: false),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_TK_BackgroundJobs", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_TK_BackgroundJobLogs_JobGroup_JobName",
table: "TK_BackgroundJobLogs",
columns: new[] { "JobGroup", "JobName" });
migrationBuilder.CreateIndex(
name: "IX_TK_BackgroundJobs_Name_Group",
table: "TK_BackgroundJobs",
columns: new[] { "Name", "Group" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TK_BackgroundJobLogs");
migrationBuilder.DropTable(
name: "TK_BackgroundJobs");
}
}
}