356 lines
12 KiB
C#
356 lines
12 KiB
C#
|
|
// <auto-generated />
|
|||
|
|
using System;
|
|||
|
|
using Microsoft.EntityFrameworkCore;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
|
|
using w4c_workflows.Data;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace w4c_workflows.Data.Migrations
|
|||
|
|
{
|
|||
|
|
[DbContext(typeof(WorkflowsDbContext))]
|
|||
|
|
[Migration("20260828134158_AddTaskKey")]
|
|||
|
|
partial class AddTaskKey
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
|
{
|
|||
|
|
#pragma warning disable 612, 618
|
|||
|
|
modelBuilder
|
|||
|
|
.HasDefaultSchema("workflows")
|
|||
|
|
.HasAnnotation("ProductVersion", "10.0.10")
|
|||
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|||
|
|
|
|||
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.ApiKey", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<Guid>("Id")
|
|||
|
|
.ValueGeneratedOnAdd()
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<DateTime>("CreatedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("KeyHash")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(64)
|
|||
|
|
.HasColumnType("character varying(64)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Label")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(200)
|
|||
|
|
.HasColumnType("character varying(200)");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("LastUsedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("RevokedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("ScopesJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<string>("TenantId")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasColumnType("text");
|
|||
|
|
|
|||
|
|
b.HasKey("Id");
|
|||
|
|
|
|||
|
|
b.HasIndex("TenantId");
|
|||
|
|
|
|||
|
|
b.ToTable("ApiKeys", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.DurableState", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<string>("InstanceId")
|
|||
|
|
.HasMaxLength(128)
|
|||
|
|
.HasColumnType("character varying(128)");
|
|||
|
|
|
|||
|
|
b.Property<DateTime>("CheckpointAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("CorrelationId")
|
|||
|
|
.HasMaxLength(128)
|
|||
|
|
.HasColumnType("character varying(128)");
|
|||
|
|
|
|||
|
|
b.Property<string>("StateJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<Guid>("TaskId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.HasKey("InstanceId");
|
|||
|
|
|
|||
|
|
b.HasIndex("CorrelationId");
|
|||
|
|
|
|||
|
|
b.ToTable("DurableStates", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.TaskRun", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<Guid>("Id")
|
|||
|
|
.ValueGeneratedOnAdd()
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<int>("Attempt")
|
|||
|
|
.HasColumnType("integer");
|
|||
|
|
|
|||
|
|
b.Property<string>("Error")
|
|||
|
|
.HasColumnType("text");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("FinishedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("InputJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<string>("OutputJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<int>("RetryCount")
|
|||
|
|
.HasColumnType("integer");
|
|||
|
|
|
|||
|
|
b.Property<Guid>("RunId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("StartedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("Status")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<Guid>("TaskId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.HasKey("Id");
|
|||
|
|
|
|||
|
|
b.HasIndex("RunId");
|
|||
|
|
|
|||
|
|
b.HasIndex("TaskId");
|
|||
|
|
|
|||
|
|
b.ToTable("TaskRuns", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.Workflow", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<Guid>("Id")
|
|||
|
|
.ValueGeneratedOnAdd()
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("CompiledAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<DateTime>("CreatedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("GitSha")
|
|||
|
|
.HasMaxLength(64)
|
|||
|
|
.HasColumnType("character varying(64)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Mode")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Name")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(200)
|
|||
|
|
.HasColumnType("character varying(200)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Path")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(500)
|
|||
|
|
.HasColumnType("character varying(500)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Status")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Target")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(100)
|
|||
|
|
.HasColumnType("character varying(100)");
|
|||
|
|
|
|||
|
|
b.Property<string>("TenantId")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasColumnType("text");
|
|||
|
|
|
|||
|
|
b.Property<string>("TriggerJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<DateTime>("UpdatedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.HasKey("Id");
|
|||
|
|
|
|||
|
|
b.HasIndex("TenantId");
|
|||
|
|
|
|||
|
|
b.HasIndex("TenantId", "Name")
|
|||
|
|
.IsUnique();
|
|||
|
|
|
|||
|
|
b.ToTable("Workflows", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.WorkflowRun", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<Guid>("Id")
|
|||
|
|
.ValueGeneratedOnAdd()
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<string>("CorrelationId")
|
|||
|
|
.HasMaxLength(128)
|
|||
|
|
.HasColumnType("character varying(128)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Error")
|
|||
|
|
.HasColumnType("text");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("FinishedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("InputJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<string>("OutputJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<DateTime?>("StartedAt")
|
|||
|
|
.HasColumnType("timestamp with time zone");
|
|||
|
|
|
|||
|
|
b.Property<string>("Status")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<string>("TenantId")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasColumnType("text");
|
|||
|
|
|
|||
|
|
b.Property<string>("TriggerJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<Guid>("WorkflowId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.HasKey("Id");
|
|||
|
|
|
|||
|
|
b.HasIndex("CorrelationId");
|
|||
|
|
|
|||
|
|
b.HasIndex("TenantId");
|
|||
|
|
|
|||
|
|
b.HasIndex("WorkflowId");
|
|||
|
|
|
|||
|
|
b.ToTable("WorkflowRuns", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.WorkflowTask", b =>
|
|||
|
|
{
|
|||
|
|
b.Property<Guid>("Id")
|
|||
|
|
.ValueGeneratedOnAdd()
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<string>("EntryJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<string>("EnvJson")
|
|||
|
|
.HasColumnType("jsonb");
|
|||
|
|
|
|||
|
|
b.Property<string>("Key")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(100)
|
|||
|
|
.HasColumnType("character varying(100)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Language")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<string>("Mode")
|
|||
|
|
.IsRequired()
|
|||
|
|
.HasMaxLength(32)
|
|||
|
|
.HasColumnType("character varying(32)");
|
|||
|
|
|
|||
|
|
b.Property<Guid?>("NextId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<Guid?>("OnErrorId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<int>("Order")
|
|||
|
|
.HasColumnType("integer");
|
|||
|
|
|
|||
|
|
b.Property<Guid?>("ParentId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.Property<Guid>("WorkflowId")
|
|||
|
|
.HasColumnType("uuid");
|
|||
|
|
|
|||
|
|
b.HasKey("Id");
|
|||
|
|
|
|||
|
|
b.HasIndex("WorkflowId");
|
|||
|
|
|
|||
|
|
b.ToTable("Tasks", "workflows");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.TaskRun", b =>
|
|||
|
|
{
|
|||
|
|
b.HasOne("w4c_workflows.Models.WorkflowRun", "Run")
|
|||
|
|
.WithMany("TaskRuns")
|
|||
|
|
.HasForeignKey("RunId")
|
|||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
|
.IsRequired();
|
|||
|
|
|
|||
|
|
b.HasOne("w4c_workflows.Models.WorkflowTask", "Task")
|
|||
|
|
.WithMany()
|
|||
|
|
.HasForeignKey("TaskId")
|
|||
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|||
|
|
.IsRequired();
|
|||
|
|
|
|||
|
|
b.Navigation("Run");
|
|||
|
|
|
|||
|
|
b.Navigation("Task");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.WorkflowRun", b =>
|
|||
|
|
{
|
|||
|
|
b.HasOne("w4c_workflows.Models.Workflow", "Workflow")
|
|||
|
|
.WithMany()
|
|||
|
|
.HasForeignKey("WorkflowId")
|
|||
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|||
|
|
.IsRequired();
|
|||
|
|
|
|||
|
|
b.Navigation("Workflow");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.WorkflowTask", b =>
|
|||
|
|
{
|
|||
|
|
b.HasOne("w4c_workflows.Models.Workflow", "Workflow")
|
|||
|
|
.WithMany("Tasks")
|
|||
|
|
.HasForeignKey("WorkflowId")
|
|||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
|
.IsRequired();
|
|||
|
|
|
|||
|
|
b.Navigation("Workflow");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.Workflow", b =>
|
|||
|
|
{
|
|||
|
|
b.Navigation("Tasks");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
modelBuilder.Entity("w4c_workflows.Models.WorkflowRun", b =>
|
|||
|
|
{
|
|||
|
|
b.Navigation("TaskRuns");
|
|||
|
|
});
|
|||
|
|
#pragma warning restore 612, 618
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|