Re-adds source uniqueness index (#156)

This commit is contained in:
Kieran
2024-04-01 18:27:52 -07:00
committed by GitHub
parent c58e176619
commit 22fbb4b930
3 changed files with 77 additions and 0 deletions
+1
View File
@@ -107,6 +107,7 @@ defmodule Pinchflat.Sources.Source do
|> dynamic_default(:uuid, fn _ -> Ecto.UUID.generate() end)
|> validate_required(required_fields)
|> cast_assoc(:metadata, with: &SourceMetadata.changeset/2, required: false)
|> unique_constraint([:collection_id, :media_profile_id, :title_filter_regex])
end
@doc false