# \#check-constraint

**URL:** https://forum.elixirforum.com/tag/check-constraint/3983.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Ecto.Migration: CHECK constraint and TRIGGER not working](https://forum.elixirforum.com/t/ecto-migration-check-constraint-and-trigger-not-working/60137)

<div class="topic-metadata">

**Author:** [@coen.bakker](https://forum.elixirforum.com/u/coen.bakker)\
**Replies:** 7\
**Last updated:** [June 23, 2025, 9:17pm UTC](https://forum.elixirforum.com/t/ecto-migration-check-constraint-and-trigger-not-working/60137 "2025-06-23T21:17:27Z")

</div>

TLDR: Database CHECK constraint and TRIGGER not working when inserting data with Ecto, but do work when inserting data with PSQL (on same database). I ran into a problem while setting up a database migration in a Phoeni…
