Postgres and MySQL both have limits on how long the name can be (63/64)
characters, Postgres does allow for a longer name but it will be
truncated.
Creating two names with the same first part will make it so that we have
two identical identifiers and the migrations will not work.
An error like this will be thrown;
{{{
django.db.utils.ProgrammingError: relation
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" already
exists
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34423>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by joelbitar):
PR; https://github.com/django/django/pull/16664
--
Ticket URL: <https://code.djangoproject.com/ticket/34423#comment:1>
* status: new => closed
* type: Bug => Cleanup/optimization
* resolution: => wontfix
Comment:
Thanks for this ticket, however, I'm against this change. First of all it
is backward incompatible. Constraints have been introduced in Django 2.2
and constraints with a name of length greater than 63 characters are valid
on other databases (64 on MySQL, 128 on MSSQL, etc.). I agree that it is a
inconsistency between constraints and indexes policy but still we need to
be careful with introducing incompatibilities. See also a related ticket,
#30614.
Please first start a discussion on the DevelopersMailingList, where you'll
reach a wider audience and see what other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets follow the triaging guidelines with regards to
wontfix tickets].
--
Ticket URL: <https://code.djangoproject.com/ticket/34423#comment:2>
Comment (by Joel Shapiro):
Replying to [comment:2 Mariusz Felisiak]:
> Thanks for this ticket, however, I'm against this change. First of all
it is backward incompatible. Constraints have been introduced in Django
2.2 and constraints with a name of length greater than 63 characters are
valid on other databases (64 on MySQL, 128 on MSSQL, etc.). I agree that
it is a inconsistency between constraints and indexes policy but still we
need to be careful with introducing incompatibilities. See also a related
ticket, #30614.
>
> Please first start a discussion on the DevelopersMailingList, where
you'll reach a wider audience and see what other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets follow the triaging guidelines with regards to
wontfix tickets].
Thanks for the fast response!
Yes, I agree. Not great to break compatibility.
--
Ticket URL: <https://code.djangoproject.com/ticket/34423#comment:3>