
Your migration is a deployment, and the rows that do not fit are never the ones you expect
The rows that refuse your new constraint are the history of the product, and your test database has none of them. A schema change on an empty database is a text file. The same change on a database wit