fix(backend): make track media fields and external id nullable
Artist, ExternalId, OriginalPictureName and OriginalAudioName were non-nullable with '' sentinels, which forced the unique (Source, ExternalId) index to rely on a filtered "<> ''" clause. Make them truly nullable and drop the empty-string sentinels, backfilling existing rows to NULL. Also fixes a formatting regression (`track != null&&`) introduced alongside the nullability change.
This commit is contained in:
@@ -2,8 +2,8 @@ namespace Musify.Infrastructure.MassTransit.Logs
|
||||
{
|
||||
public record UpdateTrackPictureLog(
|
||||
Guid TrackId,
|
||||
string PreviousOriginalPictureKey,
|
||||
string? PreviousSmallPictureKey,
|
||||
string? PreviousMediumPictureKey,
|
||||
string? PreviousLargePictureKey);
|
||||
string? PreviousOriginalPictureKey,
|
||||
string? PreviousSmallPictureKey,
|
||||
string? PreviousMediumPictureKey,
|
||||
string? PreviousLargePictureKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user