diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Base/Hos.ScheduleMaster.Base.csproj b/src/ScheduleMasterCore/Hos.ScheduleMaster.Base/Hos.ScheduleMaster.Base.csproj
index d380fec..311a3cc 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Base/Hos.ScheduleMaster.Base.csproj
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Base/Hos.ScheduleMaster.Base.csproj
@@ -1,29 +1,31 @@
-
- netstandard2.0
- ScheduleMaster
- HOHO
- ScheduleMaster
- ScheduleMaster task entry.
- true
- 2.2.0
- https://github.com/hey-hoho/ScheduleMasterCore
- github
- https://imgkr.cn-bj.ufileos.com/1dac6c35-4511-46b0-88d1-95e43c7a4b0c.png
- netcore, schedule, quartz, task
- https://github.com/hey-hoho/ScheduleMasterCore
- 2.2.0.0
- 2.2.0.0
-
+
+ net6.0
+ enable
+ disable
+ ScheduleMaster
+ HOHO
+ ScheduleMaster
+ ScheduleMaster task entry.
+ true
+ 2.2.0
+ https://github.com/hey-hoho/ScheduleMasterCore
+ github
+ https://imgkr.cn-bj.ufileos.com/1dac6c35-4511-46b0-88d1-95e43c7a4b0c.png
+ netcore, schedule, quartz, task
+ https://github.com/hey-hoho/ScheduleMasterCore
+ 2.2.0.0
+ 2.2.0.0
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/ConfigurationCache.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/ConfigurationCache.cs
index faba84f..1b26267 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/ConfigurationCache.cs
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/ConfigurationCache.cs
@@ -1,8 +1,5 @@
using Microsoft.Extensions.Configuration;
-using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
namespace Hos.ScheduleMaster.Core
{
@@ -34,7 +31,7 @@ static ConfigurationCache()
///
public static void SetNode(IConfiguration configuration)
{
- NodeSetting = configuration.GetSection("NodeSetting").Get();
+ NodeSetting = configuration.GetSection("NodeSetting").Get();
string identity = AppCommandResolver.GetCommandLineArgsValue("identity");
if (!string.IsNullOrEmpty(identity))
@@ -221,12 +218,18 @@ public class DbConnector
public DbProvider Provider { get; set; }
public string ConnectionString { get; set; }
+
+ ///
+ /// 数据库版本
+ ///
+ public string Version { get; set; }
}
public enum DbProvider
{
MySQL,
SQLServer,
- PostgreSQL
+ PostgreSQL,
+ Oracle
}
}
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/DbContext.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/DbContext.cs
index f4634c2..51a1770 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/DbContext.cs
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/DbContext.cs
@@ -17,77 +17,81 @@ namespace Hos.ScheduleMaster.Core.Models
{
public class SmDbContext : DbContext
{
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- base.OnConfiguring(optionsBuilder);
-
- optionsBuilder.UseDatabase();
- }
-
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- base.OnModelCreating(modelBuilder);
-
- //字段类型适配
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
- modelBuilder.FixColumnsDataType();
-
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ {
+ base.OnConfiguring(optionsBuilder);
+
+ optionsBuilder.UseDatabase();
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ //字段类型适配
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+ modelBuilder.FixColumnsDataType();
+
//创建索引
modelBuilder.CreateIndexes();
- //初始化数据
+ //初始化数据
modelBuilder.SeedData();
- }
- public virtual DbSet ScheduleDelayeds { get; set; }
+ }
+ public virtual DbSet ScheduleDelayeds { get; set; }
+
+ public virtual DbSet Schedules { get; set; }
- public virtual DbSet Schedules { get; set; }
+ public virtual DbSet ScheduleExecutors { get; set; }
- public virtual DbSet ScheduleExecutors { get; set; }
+ public virtual DbSet ScheduleHttpOptions { get; set; }
- public virtual DbSet ScheduleHttpOptions { get; set; }
+ public virtual DbSet ScheduleKeepers { get; set; }
- public virtual DbSet ScheduleKeepers { get; set; }
+ public virtual DbSet ScheduleLocks { get; set; }
- public virtual DbSet ScheduleLocks { get; set; }
+ public virtual DbSet ScheduleReferences { get; set; }
- public virtual DbSet ScheduleReferences { get; set; }
+ public virtual DbSet ScheduleTraces { get; set; }
- public virtual DbSet ScheduleTraces { get; set; }
+ public virtual DbSet ServerNodes { get; set; }
- public virtual DbSet ServerNodes { get; set; }
+ public virtual DbSet SystemConfigs { get; set; }
- public virtual DbSet SystemConfigs { get; set; }
+ public virtual DbSet SystemLogs { get; set; }
- public virtual DbSet SystemLogs { get; set; }
+ public virtual DbSet SystemUsers { get; set; }
- public virtual DbSet SystemUsers { get; set; }
+ public virtual DbSet TraceStatisticss { get; set; }
- public virtual DbSet TraceStatisticss { get; set; }
-
- ///
+ ///
/// 获取数据库当前时间函数
///
public string GetDbNowDateTime
{
get
{
- if (ConfigurationCache.DbConnector.Provider == DbProvider.SQLServer)
+ if (ConfigurationCache.DbConnector.Provider == DbProvider.SQLServer)
{
return "getdate()";
}
+ if (ConfigurationCache.DbConnector.Provider == DbProvider.Oracle)
+ {
+ return "( SELECT SYSDATE FROM DUAL )";
+ }
return "now()";
}
}
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/EntityFrameworkContextExtensions.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/EntityFrameworkContextExtensions.cs
index 77216fa..d1d4523 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/EntityFrameworkContextExtensions.cs
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/EntityFrameworkContextExtensions.cs
@@ -1,11 +1,6 @@
using Hos.ScheduleMaster.Core;
-using Hos.ScheduleMaster.Core.Common;
using Hos.ScheduleMaster.Core.Models;
using Microsoft.Extensions.Configuration;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
namespace Microsoft.Extensions.DependencyInjection
{
@@ -16,7 +11,8 @@ public static void AddScheduleMasterDb(this IServiceCollection services, IConfig
ConfigurationCache.DbConnector = new DbConnector
{
Provider = (DbProvider)Enum.Parse(typeof(DbProvider), configuration["DbConnector:Provider"] ?? "mysql", true),
- ConnectionString = configuration["DbConnector:ConnectionString"]
+ ConnectionString = configuration["DbConnector:ConnectionString"],
+ Version = configuration["DbConnector:Version"],
};
services.AddDbContext();
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/ModelBuilderExtensions.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/ModelBuilderExtensions.cs
index ad5fb64..1247352 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/ModelBuilderExtensions.cs
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/EntityFramework/ModelBuilderExtensions.cs
@@ -1,12 +1,8 @@
-using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.Text;
+using Hos.ScheduleMaster.Core.Common;
using Hos.ScheduleMaster.Core.Models;
-using Hos.ScheduleMaster.Core.Common;
-using System.Reflection;
+using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
+using System.Reflection;
namespace Hos.ScheduleMaster.Core.EntityFramework
{
@@ -149,7 +145,7 @@ public static ModelBuilder SeedData(this ModelBuilder builder)
);
return builder;
}
-
+
///
/// 应用数据库
///
@@ -158,19 +154,21 @@ public static ModelBuilder SeedData(this ModelBuilder builder)
public static DbContextOptionsBuilder UseDatabase(this DbContextOptionsBuilder builder)
{
var conn = ConfigurationCache.DbConnector.ConnectionString;
+ var ver = ConfigurationCache.DbConnector.Version;
switch (ConfigurationCache.DbConnector.Provider)
{
case DbProvider.SQLServer:
builder.UseSqlServer(conn);
break;
- case DbProvider.MySQL:
- builder.UseMySql(conn);
- break;
case DbProvider.PostgreSQL:
builder.UseNpgsql(conn);
break;
+ case DbProvider.Oracle:
+ builder.UseOracle(conn, b => b.UseOracleSQLCompatibility(ver)); ;
+ break;
+ case DbProvider.MySQL:
default:
- builder.UseMySql(conn);
+ builder.UseMySql(conn, new MySqlServerVersion(ver));
break;
}
return builder;
@@ -207,6 +205,10 @@ public static ModelBuilder FixColumnsDataType(this ModelBuilder builder) wher
{
builer.Property(item.Name).HasColumnType(type.Replace("varchar(max)", "text"));
}
+ if (dbProvider == DbProvider.Oracle)
+ {
+ builer.Property(item.Name).HasColumnType(type.Replace("varchar(max)", "clob"));
+ }
}
}
});
@@ -222,15 +224,15 @@ public static ModelBuilder FixColumnsDataType(this ModelBuilder builder) wher
///
public static ModelBuilder CreateIndexes(this ModelBuilder builder)
{
- builder.Entity().HasIndex(p => p.ScheduleId).HasName("scheduletraces_scheduleid_index");
- builder.Entity().HasIndex(p => p.StartTime).HasName("scheduletraces_starttime_index");
- builder.Entity().HasIndex(p => p.Result).HasName("scheduletraces_result_index");
+ builder.Entity().HasIndex(p => p.ScheduleId).HasDatabaseName("scheduletraces_scheduleid_index");
+ builder.Entity().HasIndex(p => p.StartTime).HasDatabaseName("scheduletraces_starttime_index");
+ builder.Entity().HasIndex(p => p.Result).HasDatabaseName("scheduletraces_result_index");
- builder.Entity().HasIndex(p => p.TraceId).HasName("systemlogs_traceid_index");
- builder.Entity().HasIndex(p => p.CreateTime).HasName("systemlogs_createtime_index");
+ builder.Entity().HasIndex(p => p.TraceId).HasDatabaseName("systemlogs_traceid_index");
+ builder.Entity().HasIndex(p => p.CreateTime).HasDatabaseName("systemlogs_createtime_index");
- builder.Entity().HasIndex(p => p.CreateTime).HasName("scheduledelayeds_createtime_index");
- builder.Entity().HasIndex(p => p.ContentKey).HasName("scheduledelayeds_contentkey_index");
+ builder.Entity().HasIndex(p => p.CreateTime).HasDatabaseName("scheduledelayeds_createtime_index");
+ builder.Entity().HasIndex(p => p.ContentKey).HasDatabaseName("scheduledelayeds_contentkey_index");
return builder;
}
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Hos.ScheduleMaster.Core.csproj b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Hos.ScheduleMaster.Core.csproj
index aa43508..f84c0ef 100644
--- a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Hos.ScheduleMaster.Core.csproj
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Hos.ScheduleMaster.Core.csproj
@@ -1,58 +1,66 @@
-
- netcoreapp3.1
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
- True
- True
- DbContext.tt
-
-
-
-
-
- TextTemplatingFileGenerator
- DbContext.cs
-
-
- TextTemplatingFileGenerator
- RepositoryFactory.cs
-
-
-
-
-
-
-
-
-
- True
- True
- DbContext.tt
-
-
- True
- True
- RepositoryFactory.tt
-
-
+
+ net6.0
+ enable
+ disable
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ DbContext.tt
+
+
+
+
+
+ TextTemplatingFileGenerator
+ DbContext.cs
+
+
+ TextTemplatingFileGenerator
+ RepositoryFactory.cs
+
+
+
+
+
+
+
+
+
+ True
+ True
+ DbContext.tt
+
+
+ True
+ True
+ RepositoryFactory.tt
+
+
+
+
+
+
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.Designer.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.Designer.cs
new file mode 100644
index 0000000..aea826f
--- /dev/null
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.Designer.cs
@@ -0,0 +1,741 @@
+//
+using System;
+using Hos.ScheduleMaster.Core.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Hos.ScheduleMaster.Core.Migrations
+{
+ [DbContext(typeof(SmDbContext))]
+ [Migration("20240108011145_Init")]
+ partial class Init
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.14")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleDelayedEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnName("id");
+
+ b.Property("ContentKey")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("contentkey");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("createtime");
+
+ b.Property("CreateUserName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("createusername");
+
+ b.Property("DelayAbsoluteTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("delayabsolutetime");
+
+ b.Property("DelayTimeSpan")
+ .HasColumnType("int")
+ .HasColumnName("delaytimespan");
+
+ b.Property("ExecuteTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("executetime");
+
+ b.Property("FailedRetrys")
+ .HasColumnType("int")
+ .HasColumnName("failedretrys");
+
+ b.Property("FinishTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("finishtime");
+
+ b.Property("NotifyBody")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("varchar(1000)")
+ .HasColumnName("notifybody");
+
+ b.Property("NotifyDataType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("notifydatatype");
+
+ b.Property("NotifyUrl")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("notifyurl");
+
+ b.Property("Remark")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("remark");
+
+ b.Property("SourceApp")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("sourceapp");
+
+ b.Property("Status")
+ .HasColumnType("int")
+ .HasColumnName("status");
+
+ b.Property("Topic")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("topic");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContentKey")
+ .HasDatabaseName("scheduledelayeds_contentkey_index");
+
+ b.HasIndex("CreateTime")
+ .HasDatabaseName("scheduledelayeds_createtime_index");
+
+ b.ToTable("scheduledelayeds");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnName("id");
+
+ b.Property("AssemblyName")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnName("assemblyname");
+
+ b.Property("ClassName")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnName("classname");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("createtime");
+
+ b.Property("CreateUserId")
+ .HasColumnType("int")
+ .HasColumnName("createuserid");
+
+ b.Property("CreateUserName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("createusername");
+
+ b.Property("CronExpression")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("cronexpression");
+
+ b.Property("CustomParamsJson")
+ .HasColumnType("longtext")
+ .HasColumnName("customparamsjson");
+
+ b.Property("EndDate")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("enddate");
+
+ b.Property("LastRunTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("lastruntime");
+
+ b.Property("MetaType")
+ .HasColumnType("int")
+ .HasColumnName("metatype");
+
+ b.Property("NextRunTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("nextruntime");
+
+ b.Property("Remark")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasColumnName("remark");
+
+ b.Property("RunLoop")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("runloop");
+
+ b.Property("StartDate")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("startdate");
+
+ b.Property("Status")
+ .HasColumnType("int")
+ .HasColumnName("status");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("title");
+
+ b.Property("TotalRunCount")
+ .HasColumnType("int")
+ .HasColumnName("totalruncount");
+
+ b.HasKey("Id");
+
+ b.ToTable("schedules");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleExecutorEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ b.Property("ScheduleId")
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("WorkerName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("workername");
+
+ b.HasKey("Id");
+
+ b.ToTable("scheduleexecutors");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleHttpOptionEntity", b =>
+ {
+ b.Property("ScheduleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("Body")
+ .HasColumnType("longtext")
+ .HasColumnName("body");
+
+ b.Property("ContentType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("contenttype");
+
+ b.Property("Headers")
+ .HasColumnType("longtext")
+ .HasColumnName("headers");
+
+ b.Property("Method")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("varchar(10)")
+ .HasColumnName("method");
+
+ b.Property("RequestUrl")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasColumnName("requesturl");
+
+ b.HasKey("ScheduleId");
+
+ b.ToTable("schedulehttpoptions");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleKeeperEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ b.Property("ScheduleId")
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("UserId")
+ .HasColumnType("int")
+ .HasColumnName("userid");
+
+ b.HasKey("Id");
+
+ b.ToTable("schedulekeepers");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleLockEntity", b =>
+ {
+ b.Property("ScheduleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("LockedNode")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("lockednode");
+
+ b.Property("LockedTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("lockedtime");
+
+ b.Property("Status")
+ .HasColumnType("int")
+ .HasColumnName("status");
+
+ b.HasKey("ScheduleId");
+
+ b.ToTable("schedulelocks");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleReferenceEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ b.Property("ChildId")
+ .HasColumnType("char(36)")
+ .HasColumnName("childid");
+
+ b.Property("ScheduleId")
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.HasKey("Id");
+
+ b.ToTable("schedulereferences");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ScheduleTraceEntity", b =>
+ {
+ b.Property("TraceId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnName("traceid");
+
+ b.Property("ElapsedTime")
+ .HasColumnType("double")
+ .HasColumnName("elapsedtime");
+
+ b.Property("EndTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("endtime");
+
+ b.Property("Node")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("node");
+
+ b.Property("Result")
+ .HasColumnType("int")
+ .HasColumnName("result");
+
+ b.Property("ScheduleId")
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("StartTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("starttime");
+
+ b.HasKey("TraceId");
+
+ b.HasIndex("Result")
+ .HasDatabaseName("scheduletraces_result_index");
+
+ b.HasIndex("ScheduleId")
+ .HasDatabaseName("scheduletraces_scheduleid_index");
+
+ b.HasIndex("StartTime")
+ .HasDatabaseName("scheduletraces_starttime_index");
+
+ b.ToTable("scheduletraces");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.ServerNodeEntity", b =>
+ {
+ b.Property("NodeName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("nodename");
+
+ b.Property("AccessProtocol")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasColumnName("accessprotocol");
+
+ b.Property("AccessSecret")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("accesssecret");
+
+ b.Property("Host")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("host");
+
+ b.Property("LastUpdateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("lastupdatetime");
+
+ b.Property("MachineName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("machinename");
+
+ b.Property("MaxConcurrency")
+ .HasColumnType("int")
+ .HasColumnName("maxconcurrency");
+
+ b.Property("NodeType")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasColumnName("nodetype");
+
+ b.Property("Priority")
+ .HasColumnType("int")
+ .HasColumnName("priority");
+
+ b.Property("Status")
+ .HasColumnType("int")
+ .HasColumnName("status");
+
+ b.HasKey("NodeName");
+
+ b.ToTable("servernodes");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.SystemConfigEntity", b =>
+ {
+ b.Property("Key")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("key");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("createtime");
+
+ b.Property("Group")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("group");
+
+ b.Property("IsReuired")
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("isreuired");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("name");
+
+ b.Property("Remark")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasColumnName("remark");
+
+ b.Property("Sort")
+ .HasColumnType("int")
+ .HasColumnName("sort");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("updatetime");
+
+ b.Property("UpdateUserName")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("updateusername");
+
+ b.Property("Value")
+ .HasMaxLength(1000)
+ .HasColumnType("varchar(1000)")
+ .HasColumnName("value");
+
+ b.HasKey("Key");
+
+ b.ToTable("systemconfigs");
+
+ b.HasData(
+ new
+ {
+ Key = "Email_SmtpServer",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6406),
+ Group = "邮件配置",
+ IsReuired = true,
+ Name = "邮件服务器",
+ Remark = "smtp服务器地址",
+ Sort = 1,
+ Value = ""
+ },
+ new
+ {
+ Key = "Email_SmtpPort",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6411),
+ Group = "邮件配置",
+ IsReuired = true,
+ Name = "邮件服务器端口",
+ Remark = "smtp端口号",
+ Sort = 2,
+ Value = ""
+ },
+ new
+ {
+ Key = "Email_FromAccount",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6412),
+ Group = "邮件配置",
+ IsReuired = true,
+ Name = "发件人账号",
+ Remark = "邮箱账号",
+ Sort = 3,
+ Value = ""
+ },
+ new
+ {
+ Key = "Email_FromAccountPwd",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6413),
+ Group = "邮件配置",
+ IsReuired = true,
+ Name = "发件人账号密码",
+ Remark = "登录密码或授权码等",
+ Sort = 4,
+ Value = ""
+ },
+ new
+ {
+ Key = "Assembly_ImagePullPolicy",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6414),
+ Group = "程序集配置",
+ IsReuired = true,
+ Name = "文件包拉取策略",
+ Remark = "Always-总是拉取,IfNotPresent-本地没有时拉取,默认是Always",
+ Sort = 1,
+ Value = "Always"
+ },
+ new
+ {
+ Key = "Http_RequestTimeout",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6415),
+ Group = "HTTP配置",
+ IsReuired = true,
+ Name = "请求超时时间",
+ Remark = "单位是秒,默认值是10",
+ Sort = 1,
+ Value = "10"
+ },
+ new
+ {
+ Key = "System_WorkerUnHealthTimes",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6416),
+ Group = "系统配置",
+ IsReuired = true,
+ Name = "Worker允许无响应次数",
+ Remark = "健康检查失败达到最大次数会被下线剔除,默认值是3",
+ Sort = 1,
+ Value = "3"
+ },
+ new
+ {
+ Key = "DelayTask_DelayPattern",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6418),
+ Group = "延时任务配置",
+ IsReuired = true,
+ Name = "延迟模式",
+ Remark = "Relative-相对时间,Absolute-绝对时间,默认值是Relative",
+ Sort = 1,
+ Value = "Relative"
+ },
+ new
+ {
+ Key = "DelayTask_RetryTimes",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6419),
+ Group = "延时任务配置",
+ IsReuired = true,
+ Name = "回调失败重试次数",
+ Remark = "回调失败重试次数,默认值是3",
+ Sort = 2,
+ Value = "3"
+ },
+ new
+ {
+ Key = "DelayTask_RetrySpans",
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(6420),
+ Group = "延时任务配置",
+ IsReuired = true,
+ Name = "回调失败重试间隔",
+ Remark = "回调失败重试间隔时间(s),会随着重试次数递增,默认值是10秒",
+ Sort = 3,
+ Value = "10"
+ });
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.SystemLogEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ b.Property("Category")
+ .HasColumnType("int")
+ .HasColumnName("category");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("createtime");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("message");
+
+ b.Property("Node")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("node");
+
+ b.Property("ScheduleId")
+ .HasColumnType("char(36)")
+ .HasColumnName("scheduleid");
+
+ b.Property("StackTrace")
+ .HasColumnType("longtext")
+ .HasColumnName("stacktrace");
+
+ b.Property("TraceId")
+ .HasColumnType("char(36)")
+ .HasColumnName("traceid");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateTime")
+ .HasDatabaseName("systemlogs_createtime_index");
+
+ b.HasIndex("TraceId")
+ .HasDatabaseName("systemlogs_traceid_index");
+
+ b.ToTable("systemlogs");
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.SystemUserEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("createtime");
+
+ b.Property("Email")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasColumnName("email");
+
+ b.Property("LastLoginTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("lastlogintime");
+
+ b.Property("Password")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("password");
+
+ b.Property("Phone")
+ .HasMaxLength(15)
+ .HasColumnType("varchar(15)")
+ .HasColumnName("phone");
+
+ b.Property("RealName")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("realname");
+
+ b.Property("Status")
+ .HasColumnType("int")
+ .HasColumnName("status");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasColumnName("username");
+
+ b.HasKey("Id");
+
+ b.ToTable("systemusers");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ CreateTime = new DateTime(2024, 1, 8, 9, 11, 44, 452, DateTimeKind.Local).AddTicks(5847),
+ Password = "96e79218965eb72c92a549dd5a330112",
+ RealName = "admin",
+ Status = 1,
+ UserName = "admin"
+ });
+ });
+
+ modelBuilder.Entity("Hos.ScheduleMaster.Core.Models.TraceStatisticsEntity", b =>
+ {
+ b.Property("DateNum")
+ .HasColumnType("int")
+ .HasColumnName("datenum");
+
+ b.Property("DateStamp")
+ .HasColumnType("bigint")
+ .HasColumnName("datestamp");
+
+ b.Property("Fail")
+ .HasColumnType("int")
+ .HasColumnName("fail");
+
+ b.Property("LastUpdateTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("lastupdatetime");
+
+ b.Property("Other")
+ .HasColumnType("int")
+ .HasColumnName("other");
+
+ b.Property("Success")
+ .HasColumnType("int")
+ .HasColumnName("success");
+
+ b.HasKey("DateNum");
+
+ b.ToTable("tracestatistics");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.cs b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.cs
new file mode 100644
index 0000000..665444d
--- /dev/null
+++ b/src/ScheduleMasterCore/Hos.ScheduleMaster.Core/Migrations/20240108011145_Init.cs
@@ -0,0 +1,415 @@
+using System;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
+
+namespace Hos.ScheduleMaster.Core.Migrations
+{
+ ///
+ public partial class Init : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterDatabase()
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scheduledelayeds",
+ columns: table => new
+ {
+ id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ sourceapp = table.Column(type: "varchar(50)", maxLength: 50, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ topic = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ contentkey = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ delaytimespan = table.Column(type: "int", nullable: false),
+ delayabsolutetime = table.Column(type: "datetime(6)", nullable: false),
+ createtime = table.Column(type: "datetime(6)", nullable: false),
+ createusername = table.Column(type: "varchar(50)", maxLength: 50, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ executetime = table.Column(type: "datetime(6)", nullable: true),
+ finishtime = table.Column(type: "datetime(6)", nullable: true),
+ status = table.Column(type: "int", nullable: false),
+ failedretrys = table.Column(type: "int", nullable: false),
+ remark = table.Column(type: "varchar(255)", maxLength: 255, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ notifyurl = table.Column(type: "varchar(255)", maxLength: 255, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ notifydatatype = table.Column(type: "varchar(50)", maxLength: 50, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ notifybody = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scheduledelayeds", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scheduleexecutors",
+ columns: table => new
+ {
+ id = table.Column(type: "int", nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ workername = table.Column(type: "varchar(100)", maxLength: 100, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scheduleexecutors", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "schedulehttpoptions",
+ columns: table => new
+ {
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ requesturl = table.Column(type: "varchar(500)", maxLength: 500, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ method = table.Column(type: "varchar(10)", maxLength: 10, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ contenttype = table.Column(type: "varchar(50)", maxLength: 50, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ headers = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ body = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_schedulehttpoptions", x => x.scheduleid);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "schedulekeepers",
+ columns: table => new
+ {
+ id = table.Column(type: "int", nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ userid = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_schedulekeepers", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "schedulelocks",
+ columns: table => new
+ {
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ status = table.Column(type: "int", nullable: false),
+ lockedtime = table.Column(type: "datetime(6)", nullable: true),
+ lockednode = table.Column(type: "varchar(100)", maxLength: 100, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_schedulelocks", x => x.scheduleid);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "schedulereferences",
+ columns: table => new
+ {
+ id = table.Column(type: "int", nullable: false)
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ childid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_schedulereferences", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "schedules",
+ columns: table => new
+ {
+ id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ title = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ metatype = table.Column(type: "int", nullable: false),
+ remark = table.Column(type: "varchar(500)", maxLength: 500, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ runloop = table.Column(type: "tinyint(1)", nullable: false),
+ cronexpression = table.Column(type: "varchar(50)", maxLength: 50, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ assemblyname = table.Column(type: "varchar(200)", maxLength: 200, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ classname = table.Column(type: "varchar(200)", maxLength: 200, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ customparamsjson = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ status = table.Column(type: "int", nullable: false),
+ startdate = table.Column(type: "datetime(6)", nullable: true),
+ enddate = table.Column(type: "datetime(6)", nullable: true),
+ createtime = table.Column(type: "datetime(6)", nullable: false),
+ createuserid = table.Column(type: "int", nullable: false),
+ createusername = table.Column(type: "varchar(50)", maxLength: 50, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ lastruntime = table.Column(type: "datetime(6)", nullable: true),
+ nextruntime = table.Column(type: "datetime(6)", nullable: true),
+ totalruncount = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_schedules", x => x.id);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "scheduletraces",
+ columns: table => new
+ {
+ traceid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ scheduleid = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ node = table.Column(type: "varchar(100)", maxLength: 100, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ starttime = table.Column(type: "datetime(6)", nullable: false),
+ endtime = table.Column(type: "datetime(6)", nullable: false),
+ elapsedtime = table.Column(type: "double", nullable: false),
+ result = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_scheduletraces", x => x.traceid);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "servernodes",
+ columns: table => new
+ {
+ nodename = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ nodetype = table.Column(type: "varchar(20)", maxLength: 20, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ machinename = table.Column(type: "varchar(100)", maxLength: 100, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ accessprotocol = table.Column(type: "varchar(20)", maxLength: 20, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ host = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ accesssecret = table.Column(type: "varchar(50)", maxLength: 50, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ lastupdatetime = table.Column(type: "datetime(6)", nullable: true),
+ status = table.Column(type: "int", nullable: false),
+ priority = table.Column(type: "int", nullable: false),
+ maxconcurrency = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_servernodes", x => x.nodename);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.CreateTable(
+ name: "systemconfigs",
+ columns: table => new
+ {
+ key = table.Column(type: "varchar(50)", maxLength: 50, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ group = table.Column(type: "varchar(50)", maxLength: 50, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ value = table.Column(type: "varchar(1000)", maxLength: 1000, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ sort = table.Column(type: "int", nullable: false),
+ isreuired = table.Column(type: "tinyint(1)", nullable: false),
+ remark = table.Column(type: "varchar(500)", maxLength: 500, nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ createtime = table.Column(type: "datetime(6)", nullable: false),
+ updatetime = table.Column(type: "datetime(6)", nullable: true),
+ updateusername = table.Column