diff --git a/config/prod.exs b/config/prod.exs index c8a7e59..5408599 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -15,7 +15,7 @@ config :chiya, ChiyaWeb.Endpoint, cache_static_manifest: "priv/static/cache_mani config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: Chiya.Finch # Do not print debug messages in production -config :logger, level: :info +config :logger, level: :debug # Runtime production configuration, including reading # of environment variables, is done on config/runtime.exs. diff --git a/lib/chiya/notes/note_note.ex b/lib/chiya/notes/note_note.ex index a2ae964..2ccaf84 100644 --- a/lib/chiya/notes/note_note.ex +++ b/lib/chiya/notes/note_note.ex @@ -15,5 +15,6 @@ defmodule Chiya.Notes.NoteNote do note_note |> cast(attrs, [:source_id, :target_id]) |> validate_required([:source_id, :target_id]) + |> unique_constraint([:source_id, :target_id]) end end