Index: django/db/models/fields/__init__.py =================================================================== --- django/db/models/fields/__init__.py (revision 3608) +++ django/db/models/fields/__init__.py (working copy) @@ -663,6 +663,14 @@ def get_manipulator_field_objs(self): return [forms.IntegerField] +class BigIntegerField(IntegerField): + def get_manipulator_field_objs(self): + return [forms.BigIntegerField] + +class PositiveBigIntegerField(IntegerField): + def get_manipulator_field_objs(self): + return [forms.PositiveBigIntegerField] + class IPAddressField(Field): def __init__(self, *args, **kwargs): kwargs['maxlength'] = 15 Index: django/db/backends/mysql/introspection.py =================================================================== --- django/db/backends/mysql/introspection.py (revision 3608) +++ django/db/backends/mysql/introspection.py (working copy) @@ -82,7 +82,7 @@ FIELD_TYPE.FLOAT: 'FloatField', FIELD_TYPE.INT24: 'IntegerField', FIELD_TYPE.LONG: 'IntegerField', - FIELD_TYPE.LONGLONG: 'IntegerField', + FIELD_TYPE.LONGLONG: 'BigIntegerField', FIELD_TYPE.SHORT: 'IntegerField', FIELD_TYPE.STRING: 'TextField', FIELD_TYPE.TIMESTAMP: 'DateTimeField', Index: django/db/backends/mysql/creation.py =================================================================== --- django/db/backends/mysql/creation.py (revision 3608) +++ django/db/backends/mysql/creation.py (working copy) @@ -14,12 +14,14 @@ 'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)', 'ImageField': 'varchar(100)', 'IntegerField': 'integer', + 'BigIntegerField': 'bigint', 'IPAddressField': 'char(15)', 'ManyToManyField': None, 'NullBooleanField': 'bool', 'OneToOneField': 'integer', 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer UNSIGNED', + 'PositiveBigIntegerField': 'bigint UNSIGNED', 'PositiveSmallIntegerField': 'smallint UNSIGNED', 'SlugField': 'varchar(%(maxlength)s)', 'SmallIntegerField': 'smallint', Index: django/forms/__init__.py =================================================================== --- django/forms/__init__.py (revision 3608) +++ django/forms/__init__.py (working copy) @@ -738,6 +738,20 @@ if not 0 <= int(field_data) <= 32767: raise validators.CriticalValidationError, gettext("Enter a whole number between 0 and 32,767.") +class BigIntegerField(IntegerField): + def __init__(self, field_name, length=20, maxlength=None, is_required=False, validator_list=None, member_name=None): + if validator_list is None: validator_list = [] + validator_list = [self.isInteger] + validator_list + if member_name is not None: + self.member_name = member_name + IntegerField.__init__(self, field_name, length, maxlength, is_required, validator_list) + +class PositiveBigIntegerField(PositiveIntegerField): + def __init__(self, field_name, length=20, maxlength=None, is_required=False, validator_list=None): + if validator_list is None: validator_list = [] + validator_list = [self.isPositive] + validator_list + IntegerField.__init__(self, field_name, length, maxlength, is_required, validator_list) + class FloatField(TextField): def __init__(self, field_name, max_digits, decimal_places, is_required=False, validator_list=None): if validator_list is None: validator_list = [] Index: django/contrib/admin/views/doc.py =================================================================== --- django/contrib/admin/views/doc.py (revision 3608) +++ django/contrib/admin/views/doc.py (working copy) @@ -289,6 +289,7 @@ # If a column type is set to None, it won't be included in the output. DATA_TYPE_MAPPING = { 'AutoField' : _('Integer'), + 'BigIntegerField' : _('Integer'), 'BooleanField' : _('Boolean (Either True or False)'), 'CharField' : _('String (up to %(maxlength)s)'), 'CommaSeparatedIntegerField': _('Comma-separated integers'), @@ -306,6 +307,7 @@ 'NullBooleanField' : _('Boolean (Either True, False or None)'), 'OneToOneField' : _('Relation to parent model'), 'PhoneNumberField' : _('Phone number'), + 'PositiveBigIntegerField' : _('Integer'), 'PositiveIntegerField' : _('Integer'), 'PositiveSmallIntegerField' : _('Integer'), 'SlugField' : _('String (up to %(maxlength)s)'),