diff --git a/test/support/comment.ex b/test/support/comment.ex index bbb792c..ee1b788 100644 --- a/test/support/comment.ex +++ b/test/support/comment.ex @@ -13,5 +13,6 @@ defmodule Alog.TestApp.Comment do def changeset(comment_struct, attrs \\ %{}) do comment_struct |> cast(attrs, [:cid, :entry_id, :comment, :deleted]) + |> unique_constraint(:cid, name: :comments_pkey) end end \ No newline at end of file