- delcons (on June 9, 2009):
Hi, I am using your bigint_patch, it works very well. I tried to expand it to accomodate OneToOneFields and ManyToManyFields as well, but I am lacking some expertise for setting up the ManyToManyField. Have you tried this? I would appreciate any help or suggestions.
- munhitsu (on July 1, 2009):
For sqlite3 use (for both BigIntegerField, BigAutoField):
if settings.DATABASE_ENGINE == 'sqlite3':
- peterbe (on June 9, 2010):
Does anybody have a new version of this for 1.2 or do I need to write one myself?
- joksim (on January 15, 2011):
I would also be interested in support for 1.2.x.
I have very limited knowledge of python and django.
If someone has a working version for this patch, I would be very grateful.
- jayd (on August 31, 2011):
I have made a hack to get this to work with django 1.3
What you do is replace the:
if settings.DATABASE_ENGINE == 'mysql':
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.mysql':
as in line 22, but with the relevant string for the other engines
And it works.
It only finds what the default database engine is set to, not the current model's engine. So that is a bit of a flaw.
If anyone knows how to access the model instance from this file, we could try something like:
from dhango.db import router
if router.db_for_read(model_instance.class, instance=model_instance) = '?'
- tomleaf (on July 21, 2012):
Thanks for the script. It was a very helpful starting point.
I ended up need a bit more to get it working end-to-end.
Here is my version: https://gist.github.com/3158388
v1.0: Created by Florian
v1.1: Updated by Thomas
Fixed missing param
Used endswith for engine type check
(for better compatibility with
dj_database_url and heroku)
Added support for sqlite3 (which uses BIGINT by default)
Returned super.db_type() for other database
Added south's add_introspection_rules if south is defined
Added BigOneToOneField and short description
Assumed file location: common/fields.py
- Akshay.kapoor (on July 30, 2013):
Hey tomleaf, can you share the updated version of the patch which you have created for ManyToMany fields and OneToOne fields..