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

This commit is contained in:
2026-07-16 01:05:28 +02:00
parent cc1c1c204f
commit 2cecd118ed
7 changed files with 829 additions and 2 deletions
@@ -307,6 +307,11 @@ namespace Musify.Infrastructure.Persistence.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Artist")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("AudioFolderName")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
@@ -320,6 +325,11 @@ namespace Musify.Infrastructure.Persistence.Migrations
b.Property<int>("Duration")
.HasColumnType("integer");
b.Property<string>("ExternalId")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("character varying(16)");
b.Property<string>("LargePictureName")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
@@ -359,6 +369,9 @@ namespace Musify.Infrastructure.Persistence.Migrations
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<int>("Source")
.HasColumnType("integer");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(50)
@@ -369,6 +382,10 @@ namespace Musify.Infrastructure.Persistence.Migrations
b.HasKey("Id");
b.HasIndex("Source", "ExternalId")
.IsUnique()
.HasFilter("\"ExternalId\" <> ''");
b.ToTable("Tracks");
});