Create a Unique Attribute

I have this AshPostgres resource and want to make sure the the title is unique. How can I do that?

  attributes do
    uuid_primary_key :id

    attribute :title, :string do
      allow_nil? false
    end
  end
Was this page helpful?