// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Moonlight.ApiServer.Database; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Moonlight.ApiServer.Database.Migrations { [DbContext(typeof(TickerDataContext))] [Migration("20250819200221_AddedTickerQ")] partial class AddedTickerQ { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.7") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.CronTickerEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Description") .HasColumnType("text"); b.Property("Expression") .HasColumnType("text"); b.Property("Function") .HasColumnType("text"); b.Property("InitIdentifier") .HasColumnType("text"); b.Property("Request") .HasColumnType("bytea"); b.Property("Retries") .HasColumnType("integer"); b.PrimitiveCollection("RetryIntervals") .HasColumnType("integer[]"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("Expression") .HasDatabaseName("IX_CronTickers_Expression"); b.ToTable("CronTickers", "ticker"); }); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.CronTickerOccurrenceEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CronTickerId") .HasColumnType("uuid"); b.Property("ElapsedTime") .HasColumnType("bigint"); b.Property("Exception") .HasColumnType("text"); b.Property("ExecutedAt") .HasColumnType("timestamp with time zone"); b.Property("ExecutionTime") .HasColumnType("timestamp with time zone"); b.Property("LockHolder") .HasColumnType("text"); b.Property("LockedAt") .HasColumnType("timestamp with time zone"); b.Property("RetryCount") .HasColumnType("integer"); b.Property("Status") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CronTickerId") .HasDatabaseName("IX_CronTickerOccurrence_CronTickerId"); b.HasIndex("ExecutionTime") .HasDatabaseName("IX_CronTickerOccurrence_ExecutionTime"); b.HasIndex("CronTickerId", "ExecutionTime") .IsUnique() .HasDatabaseName("UQ_CronTickerId_ExecutionTime"); b.HasIndex("Status", "ExecutionTime") .HasDatabaseName("IX_CronTickerOccurrence_Status_ExecutionTime"); b.ToTable("CronTickerOccurrences", "ticker"); }); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.TimeTickerEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BatchParent") .HasColumnType("uuid"); b.Property("BatchRunCondition") .HasColumnType("integer"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Description") .HasColumnType("text"); b.Property("ElapsedTime") .HasColumnType("bigint"); b.Property("Exception") .HasColumnType("text"); b.Property("ExecutedAt") .HasColumnType("timestamp with time zone"); b.Property("ExecutionTime") .HasColumnType("timestamp with time zone"); b.Property("Function") .HasColumnType("text"); b.Property("InitIdentifier") .HasColumnType("text"); b.Property("LockHolder") .IsConcurrencyToken() .HasColumnType("text"); b.Property("LockedAt") .HasColumnType("timestamp with time zone"); b.Property("Request") .HasColumnType("bytea"); b.Property("Retries") .HasColumnType("integer"); b.Property("RetryCount") .HasColumnType("integer"); b.PrimitiveCollection("RetryIntervals") .HasColumnType("integer[]"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("BatchParent"); b.HasIndex("ExecutionTime") .HasDatabaseName("IX_TimeTicker_ExecutionTime"); b.HasIndex("Status", "ExecutionTime") .HasDatabaseName("IX_TimeTicker_Status_ExecutionTime"); b.ToTable("TimeTickers", "ticker"); }); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.CronTickerOccurrenceEntity", b => { b.HasOne("TickerQ.EntityFrameworkCore.Entities.CronTickerEntity", "CronTicker") .WithMany() .HasForeignKey("CronTickerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CronTicker"); }); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.TimeTickerEntity", b => { b.HasOne("TickerQ.EntityFrameworkCore.Entities.TimeTickerEntity", "ParentJob") .WithMany("ChildJobs") .HasForeignKey("BatchParent") .OnDelete(DeleteBehavior.Restrict); b.Navigation("ParentJob"); }); modelBuilder.Entity("TickerQ.EntityFrameworkCore.Entities.TimeTickerEntity", b => { b.Navigation("ChildJobs"); }); #pragma warning restore 612, 618 } } }