i get an "Out of range value adjusted for column"
not sure whether there is a fix for this in django
i get an "Out of range value adjusted for column"
not sure whether there is a fix for this in django
Django ticket #399 deals with this. I also opened a similar question quite some time ago.
A workaround that I have used in the past is to simply ALTER
the field in question directly in the DB table to BIGINT
(for MySQL, for example). Note, however, that if you reset the application in which the particular model with the particular field exists, or drop the table and recreate it by any means, you will have to ALTER
the field again.
You should create custom field inhrited from Field or IntegerField
class BigintField(models.Field):
def db_type(self):
return 'BIGINT(20)'
...
and
class MyModel(models.Model):
bigid = BigintField()
For South users, django's built-in DecimalField may work better than the custom BigintField approach above. Looks like it takes a bit of extra work to teach South about custom field types.