Closed wd0517 closed 1 year ago
Do we need the tidb
prefix? I think it's TiDB unique and already under django-tidb
scope?
Seems after v6.4.0 make it default doesn't hurt anything.
Do we need the
tidb
prefix? I think it's TiDB unique and already underdjango-tidb
scope?
I think has tidb
prefix can help application developers understand that this attribute belongs to tidb.
I have added a TIDB_DEFAULT_AUTO_ID_CACHE = 1
which can be modified in settings.py
.
I revert the above change, because AUTO_ID_CACHE=1
have bad performance before TiDB v6.4.0, if we set a default auto_id_cache in django-tidb
, it will make things become complex.
Refer to https://github.com/pingcap/django-tidb/issues/52
This PR plans to support
AUTO_ID_CACHE
in Django by declaring it in the model's meta option.Note:
tidb_auto_id_cache
only affects table creation.For example:
This PR also removed
functions.py
because we have already revertedDatabaseWrapper.vendor
to mysql, so there is no need to patch the as_tidb function anymore.