I'm currently building a project which involves a lot of collective intelligence. Every user visiting the web site gets created a unique profile and their data is later used to calculate best matches for themselves and other users.
By default, Django creates an INT(11)
id = BigIntegerField(primary_key=True)
NOTE: This answer as modified, according to Larry's code. Previous solution extended fields.BigIntegerField, but better to extend fields.AutoField
I had the same problem and solved with following code:
from django.db.models import fields from south.modelsinspector import add_introspection_rules class BigAutoField(fields.AutoField): def db_type(self, connection): if 'mysql' in connection.__class__.__module__: return 'bigint AUTO_INCREMENT' return super(BigAutoField, self).db_type(connection) add_introspection_rules(, ["^MYAPP\.fields\.BigAutoField"])
Apparently this is working fine with south migrations.