Remove record notes

This commit is contained in:
Claudio Ortolina
2025-09-07 15:06:13 +03:00
parent 4fca772b00
commit ea9f8ca9a3
2 changed files with 16 additions and 3 deletions
+1 -3
View File
@@ -26,7 +26,6 @@ defmodule MusicLibrary.Records.Record do
field :release_ids, {:array, :string}, default: []
field :included_release_group_ids, {:array, :string}, default: []
field :dominant_colors, {:array, :string}, default: []
field :notes, :string
embeds_many :artists, Artist, on_replace: :delete
@@ -128,8 +127,7 @@ defmodule MusicLibrary.Records.Record do
:cover_url,
:cover_hash,
:dominant_colors,
:purchased_at,
:notes
:purchased_at
])
|> cast_embed(:artists)
|> validate_required([:type, :title, :musicbrainz_id, :genres])
@@ -0,0 +1,15 @@
defmodule MusicLibrary.Repo.Migrations.RemoveRecordNotes do
use Ecto.Migration
def up do
alter table(:records) do
remove(:notes)
end
end
def down do
alter table(:records) do
add :notes, :string
end
end
end