Considering two models (ModelA and ModelB) both with one CheckConstraint
with the same name "test_constraint". The system check would return the
following error:
{{{
?: (models.E032) constraint name 'test_constraint' is not unique among
models: app.ModelA, app.ModelB.
}}}
https://github.com/django/django/pull/11278
--
Ticket URL: <https://code.djangoproject.com/ticket/34491>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Simon Charette (added)
* status: new => closed
* resolution: => wontfix
Comment:
Thanks for the report. It's true that constraints on different tables may
have the same names on PostgreSQL. However, it's not truth on other
databases. Moreover, using the same names is a rare practice when we take
into account that it has not been noticed for 4 years. I'd prefer to keep
the check for cross-database compatibility. You can always silence it by
adding `SILENCED_SYSTEM_CHECKS = ["models.E032"]` to the settings.
I hope that makes sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/34491#comment:1>