Re-adds source uniqueness index

This commit is contained in:
Kieran Eglin
2024-04-01 18:08:46 -07:00
parent c58e176619
commit 4e26253b33
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