Is there a limit to the AutoField in a Django model or the database back-ends?
The Django project I am working on could potentially see a lot of objects in certain database tables which would be in excess of 40000 within a short amount of time.
I am using Sqlite for dev and Postgresql for production.
Adding this as an answer. Django maps this to serial columns which means that the maximum value is in the 2 billion range ( 2,147,483,647 to be exact). While that is unlikely to be an issue for most applications, if you do, you could alter the type to become a bigint instead and this would make it highly unlikely you will ever reach the end of 64-bit int space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With