Adding new info for Django 2.x
:
Djangos AutoField
is an IntegerField
. The docs for IntegerField
say:
Values from -2.147.483.648
to 2.147.483.647
are safe in all databases supported by Django.
AutoField
per default only uses positive numbers, so the values can go from 1
to 2.147.483.647
.
Since Django 1.10
there is also an BigAutoField
, which is very similar to the BigIntegerField
.
The docs for BigAutoField
say:
A 64-bit integer [...] that is guaranteed to fit numbers from 1
to 9.223.372.036.854.775.807
.
Now, the docs don't say it explicitly for this field, but by using the words is garanteed to fit
, I assume that applies for all databases supported by Django.
bigserial
(9 223 372 036 854 775 807) if needed. – Outcome