This commit is contained in:
byte[] 2020-09-26 23:52:25 -04:00
parent 18a571e7d1
commit 9fbff24bd7

View file

@ -54,7 +54,7 @@ defmodule Philomena.Tags.Tag do
@derive {Phoenix.Param, key: :slug}
schema "tags" do
belongs_to :aliased_tag, Tag, source: :aliased_tag_id
belongs_to :aliased_tag, Tag, source: :aliased_tag_id, on_replace: :nilify
has_many :aliases, Tag, foreign_key: :aliased_tag_id
has_many :channels, Channel, foreign_key: :associated_artist_tag_id