#34423: Migrations, UniqueConstraint lenght of identifier can be too long for
Postgres/MySQL
-------------------------------------+-------------------------------------
               Reporter:  joelbitar  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  4.1
  Migrations                         |       Keywords:  migrations,
               Severity:  Normal     |  unique_constraint, UniqeConstraint
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When creating a new unique constraint it is quite easy with the
 interpolation of %(class)s to generate a very long name as identifier
 (name) of the constraint.

 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070186fe11b2eb-59ea25f6-19a3-4519-8c81-cf050a838897-000000%40eu-central-1.amazonses.com.

Reply via email to