mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14:11:10 +00:00
Completes the scheduled jobs module with default jobs, a themed scheduler page and aligned recovery semantics
This commit is contained in:
1 parent
99a6159f7f
commit
4b7cfbbe11
67 files changed
+3324
-745
No files matched your search
@@ -44,22 +44,26 @@ public class ScheduledJobExecutionConfiguration : IEntityTypeConfiguration<Sched
|
||||
builder.Property(execution => execution.CompletedOnUtc)
|
||||
.HasColumnOrder(5);
|
||||
|
||||
// Audit.
|
||||
builder.Property(execution => execution.CreatedOnUtc)
|
||||
builder.Property(execution => execution.WasCycleActive)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(6);
|
||||
|
||||
builder.Property(execution => execution.CreatedBy)
|
||||
// Audit.
|
||||
builder.Property(execution => execution.CreatedOnUtc)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(7);
|
||||
|
||||
builder.Property(execution => execution.CreatedBy)
|
||||
.IsRequired()
|
||||
.HasColumnOrder(8);
|
||||
|
||||
builder.Property(execution => execution.UpdatedOnUtc)
|
||||
.HasDefaultValue(null)
|
||||
.HasColumnOrder(8);
|
||||
.HasColumnOrder(9);
|
||||
|
||||
builder.Property(execution => execution.UpdatedBy)
|
||||
.HasDefaultValue(null)
|
||||
.HasColumnOrder(9);
|
||||
.HasColumnOrder(10);
|
||||
|
||||
// Enables fast queries of the execution history of scheduled jobs by their time range, and the cleanup of the executions of a removed scheduled job.
|
||||
builder.HasIndex(execution => new { execution.StartedOnUtc, execution.ScheduledJobId });
|
||||
|
||||
+1792
File diff suppressed because it is too large.
Load diff
+115
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Lumina.DataAccess.Common.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddsWasCycleActiveToScheduledJobExecutions : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 9)
|
||||
.OldAnnotation("Relational:ColumnOrder", 8);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "UpdatedBy",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 10)
|
||||
.OldAnnotation("Relational:ColumnOrder", 9);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "CreatedOnUtc",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT")
|
||||
.Annotation("Relational:ColumnOrder", 7)
|
||||
.OldAnnotation("Relational:ColumnOrder", 6);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CreatedBy",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "TEXT")
|
||||
.Annotation("Relational:ColumnOrder", 8)
|
||||
.OldAnnotation("Relational:ColumnOrder", 7);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "WasCycleActive",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false)
|
||||
.Annotation("Relational:ColumnOrder", 6);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "WasCycleActive",
|
||||
table: "ScheduledJobExecutions");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 8)
|
||||
.OldAnnotation("Relational:ColumnOrder", 9);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "UpdatedBy",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 9)
|
||||
.OldAnnotation("Relational:ColumnOrder", 10);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "CreatedOnUtc",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT")
|
||||
.Annotation("Relational:ColumnOrder", 6)
|
||||
.OldAnnotation("Relational:ColumnOrder", 7);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CreatedBy",
|
||||
table: "ScheduledJobExecutions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "TEXT")
|
||||
.Annotation("Relational:ColumnOrder", 7)
|
||||
.OldAnnotation("Relational:ColumnOrder", 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1167,11 +1167,11 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
|
||||
b.Property<Guid>("CreatedBy")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(7);
|
||||
.HasColumnOrder(8);
|
||||
|
||||
b.Property<DateTime>("CreatedOnUtc")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(6);
|
||||
.HasColumnOrder(7);
|
||||
|
||||
b.Property<bool>("IsCycleRun")
|
||||
.HasColumnType("INTEGER")
|
||||
@@ -1192,11 +1192,15 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
|
||||
b.Property<Guid?>("UpdatedBy")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(9);
|
||||
.HasColumnOrder(10);
|
||||
|
||||
b.Property<DateTime?>("UpdatedOnUtc")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(8);
|
||||
.HasColumnOrder(9);
|
||||
|
||||
b.Property<bool>("WasCycleActive")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(6);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
||||
Reference in new issue
Block a user