#1820: Autogenerated ManyToMany fields can generate too long identifiers for
mysql
to handle
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Database wrapper
Version: SVN | Resolution:
Keywords: mysql | Stage: Accepted
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------+---------------------------------------------
Comment (by Simon G. <[EMAIL PROTECTED]>):
Hmm.. I don't think it'll be as easy as chopping the generated constraint
at position 63, since this will probably make it easier to get clashes.
Whilst it's nice to have a human readable name for the constraints, how
useful is it really? you can get this info from the database anyway (SHOW
INDEX... on mysql).
So - why not just take an md5 of the generated constraint, this way you're
guaranteed to get a 32 char constraint, and it'll be unique across the
tables/constraints.
--
Ticket URL: <http://code.djangoproject.com/ticket/1820#comment:5>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---