feat(backend): add source, external id and artist to tracks

This commit is contained in:
2026-07-16 01:05:28 +02:00
parent 49b7d54e58
commit 87997d90a4
7 changed files with 829 additions and 2 deletions
@@ -30,6 +30,11 @@ namespace Musify.Infrastructure.Persistence
trackProcessing.Property(state => state.CorrelationId).ValueGeneratedNever();
trackProcessing.Property(state => state.CurrentState).HasMaxLength(64);
modelBuilder.Entity<Track>()
.HasIndex(track => new { track.Source, track.ExternalId })
.IsUnique()
.HasFilter("\"ExternalId\" <> ''");
var playListProcessing = modelBuilder.Entity<PlayListProcessingState>();
playListProcessing.HasKey(state => state.CorrelationId);
playListProcessing.Property(state => state.CorrelationId).ValueGeneratedNever();