#13434: MySQL Index creation with long name fails
------------------------------------------+---------------------------------
 Reporter:  hgee...@osso.nl               |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2-beta  
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  1                             |  
------------------------------------------+---------------------------------
 With the introduction of the through model for !ManyToManyFields in
 [11710] django creates an index for all !ForeignKeys on the through model.
 Because of the naming scheme used by the through model you can easily
 exceed the 64 character limit for the index name on MySQL.

 django-1.1 did not have this problem because it created an index with
 'ALTER TABLE %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s)%s;'
 for which the name is already truncated.

 Syncdb only generates an error but does not stop so this is only a minor
 inconvenience.
 The attached patch truncates the index name if applicable and sets the
 max_name_length for mysql to 64.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13434>
Django <http://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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to