Remove record notes
This commit is contained in:
@@ -26,7 +26,6 @@ defmodule MusicLibrary.Records.Record do
|
|||||||
field :release_ids, {:array, :string}, default: []
|
field :release_ids, {:array, :string}, default: []
|
||||||
field :included_release_group_ids, {:array, :string}, default: []
|
field :included_release_group_ids, {:array, :string}, default: []
|
||||||
field :dominant_colors, {:array, :string}, default: []
|
field :dominant_colors, {:array, :string}, default: []
|
||||||
field :notes, :string
|
|
||||||
|
|
||||||
embeds_many :artists, Artist, on_replace: :delete
|
embeds_many :artists, Artist, on_replace: :delete
|
||||||
|
|
||||||
@@ -128,8 +127,7 @@ defmodule MusicLibrary.Records.Record do
|
|||||||
:cover_url,
|
:cover_url,
|
||||||
:cover_hash,
|
:cover_hash,
|
||||||
:dominant_colors,
|
:dominant_colors,
|
||||||
:purchased_at,
|
:purchased_at
|
||||||
:notes
|
|
||||||
])
|
])
|
||||||
|> cast_embed(:artists)
|
|> cast_embed(:artists)
|
||||||
|> validate_required([:type, :title, :musicbrainz_id, :genres])
|
|> 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
|
||||||
Reference in New Issue
Block a user