Track manual snapshots and apply versioned camera config
Heimdall Gitea / Build and tests (pull_request) Failing after 1m34s
Heimdall Gitea / Publish versioned release (pull_request) Skipped

This commit is contained in:
Arnaud Dartois committed 2026-10-23 07:30:58 +02:00
1 parent f4a8f4a668
commit 8f00f69a5f
30 files changed
+645 -63

No files matched your search

@@ -44,6 +44,10 @@ public class AgentConfiguration : IEntityTypeConfiguration<Agent>
.HasMaxLength(8)
.IsUnicode(false);
builder.Property(a => a.LastAppliedCameraConfigVersion)
.HasMaxLength(64)
.IsUnicode(false);
builder.Property(a => a.GpuType)
.HasConversion<string>()
.HasMaxLength(20)
@@ -0,0 +1,21 @@
using Heimdall.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Heimdall.Infrastructure.Data.Configurations;
public sealed class ManualSnapshotRequestConfiguration : IEntityTypeConfiguration<ManualSnapshotRequest>
{
public void Configure(EntityTypeBuilder<ManualSnapshotRequest> builder)
{
builder.ToTable("manual_snapshot_requests");
builder.HasKey(x => x.Id);
builder.Property(x => x.Status).HasConversion<string>().HasMaxLength(20).IsRequired();
builder.Property(x => x.FailureReason).HasMaxLength(200);
builder.Property(x => x.CreatedAt).IsRequired();
builder.Property(x => x.UpdatedAt).IsRequired();
builder.Property(x => x.ExpiresAt).IsRequired();
builder.HasIndex(x => new { x.CameraId, x.CreatedAt });
builder.HasIndex(x => x.ExpiresAt);
}
}