Add associations between notes and artists/records
This commit is contained in:
@@ -4,6 +4,7 @@ defmodule MusicLibrary.Artists.ArtistInfo do
|
||||
import Ecto.Changeset
|
||||
|
||||
alias MusicBrainz.ExternalLink
|
||||
alias MusicLibrary.Notes.Note
|
||||
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
schema "artist_infos" do
|
||||
@@ -11,6 +12,8 @@ defmodule MusicLibrary.Artists.ArtistInfo do
|
||||
field :discogs_data, :map, default: %{}
|
||||
field :image_data_hash, :string
|
||||
|
||||
has_one :note, Note, foreign_key: :musicbrainz_id
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user