Now for some leg work. The simple part is to remove the primary key assert in AutoField.__init__.
The hard part is that django creates tables with multiple sql statements. One for the table create and then one for each index. MySQL requires that auto_increment fields must be indexed. Since django does not include the indexes in the table create statement the create fails with the following error. (1075, 'Incorrect table definition; there can be only one auto column and it must be defined as a key') So for the MySQL backend the index creation would need to be moved to the table create statement. I'll note that if the AutoField is defined with unique=True the table create works. This is because the index is created with the UNIQUE key on the field definition and not in a separate CREATE INDEX statement. Andy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
