---
title: "Discussion on \"Complex Unique Constraints with PostgreSQL Triggers in Ecto\" | Hashnode"
description: "Discussion on \"Complex Unique Constraints with PostgreSQL Triggers in Ecto\". Ecto makes it easy to work with typical uniqueness constraints in your database; you just\ndefine your table like this:\ndefmodule MyApp.Repo.Migrations.CreateFoos do\n  use Ecto.Migration\n\n  def change do\n    create table(:foos) do\n      add :name, :te..."
url: "https://hashnode.com/posts/complex-unique-constraints-with-postgresql-triggers-in-ecto/6571c2aeede283175c9ff7fc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Complex Unique Constraints with PostgreSQL Triggers in Ecto](https://johnwilger.com/complex-unique-constraints-with-postgresql-triggers-in-ecto?utm_source=hashnode&utm_medium=feed)

Ecto makes it easy to work with typical uniqueness constraints in your database; you just define your table like this: defmodule MyApp.Repo.Migrations.CreateFoos do use Ecto.Migration def change do create table(:foos) do add :name, :te...

Feb 16, 2020 · 6 min read · johnwilger.com  
Read the article

-   [#ecto](https://hashnode.com/tag/ecto)
-   [#elixir](https://hashnode.com/tag/elixir)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#database](https://hashnode.com/tag/database)

## Written by

[John Wilger](https://hashnode.com/@jwilger)

@jwilger

  
[View profile](https://hashnode.com/@jwilger)

VP of Engineering at Artium

Dynamic and strategic Senior Engineering Leader with over 20 years of experience in driving technical innovation and leading high-performing engineering teams. Adept at developing and executing technology strategies that align with corporate goals. Proven track record in scaling engineering departments, fostering a culture of excellence, and steering cross-functional teams towards achieving remarkable results. Passionate about leveraging technology to solve complex problems and deliver exceptional value. As a seasoned engineering leader, I believe in fostering a culture of innovation, collaboration, and continuous improvement. I am committed to building inclusive teams where each member feels valued and empowered to contribute their best work. My leadership approach is rooted in open communication, transparency, and a deep understanding of both technological trends and business needs. I prioritize mentorship and professional growth, ensuring that teams are equipped to meet the evolving challenges in the tech landscape.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
