refactor: drop dead code left after the worktree move
ChipGroup is orphaned since the explore rewrite dropped the filter chips. Mix.GeneratedOn was written on every generation and never read, and it duplicated CreatedAt, which IAuditable already sets at the same moment.
This commit is contained in:
@@ -304,8 +304,6 @@ namespace Musify.Application.Mixes
|
||||
database.Mixes.RemoveRange(previousMixes);
|
||||
}
|
||||
|
||||
var today = DateOnly.FromDateTime(DateTime.UtcNow);
|
||||
|
||||
for (var position = 0; position < drafts.Count; position++)
|
||||
{
|
||||
var draft = drafts[position];
|
||||
@@ -314,7 +312,6 @@ namespace Musify.Application.Mixes
|
||||
UserId = userId,
|
||||
Title = draft.Title,
|
||||
Subtitle = draft.Subtitle,
|
||||
GeneratedOn = today,
|
||||
Position = position
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Musify.Application.Mixes.Responses
|
||||
Guid Id,
|
||||
string Title,
|
||||
string? Subtitle,
|
||||
DateOnly GeneratedOn,
|
||||
int ItemCount,
|
||||
IReadOnlyList<MixItemApplicationResponse> Items)
|
||||
{
|
||||
@@ -20,7 +19,6 @@ namespace Musify.Application.Mixes.Responses
|
||||
mix.Id,
|
||||
mix.Title,
|
||||
mix.Subtitle,
|
||||
mix.GeneratedOn,
|
||||
itemCount,
|
||||
[.. items.Select(MixItemApplicationResponse.FromEntity)]);
|
||||
}
|
||||
|
||||
@@ -22,9 +22,6 @@ namespace Musify.Domain.Entities
|
||||
[MaxLength(256)]
|
||||
public string? Subtitle { get; set; }
|
||||
|
||||
[Required]
|
||||
public required DateOnly GeneratedOn { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Position { get; set; } = 0;
|
||||
|
||||
|
||||
Generated
+1175
File diff suppressed because it is too large
Load Diff
+30
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Musify.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DropMixGeneratedOn : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GeneratedOn",
|
||||
table: "Mixes");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateOnly>(
|
||||
name: "GeneratedOn",
|
||||
table: "Mixes",
|
||||
type: "date",
|
||||
nullable: false,
|
||||
defaultValue: new DateOnly(1, 1, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -325,9 +325,6 @@ namespace Musify.Infrastructure.Persistence.Migrations
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<DateOnly>("GeneratedOn")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("integer");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user