mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #31007 -- Allowed specifying type of auto-created primary keys.
This also changes the default type of auto-created primary keys for new apps and projects to BigAutoField.
This commit is contained in:
parent
b960e4ed72
commit
b5e12d490a
28 changed files with 415 additions and 11 deletions
|
@ -1245,6 +1245,17 @@ format has higher precedence and will be applied instead.
|
|||
See also :setting:`NUMBER_GROUPING`, :setting:`THOUSAND_SEPARATOR` and
|
||||
:setting:`USE_THOUSAND_SEPARATOR`.
|
||||
|
||||
.. setting:: DEFAULT_AUTO_FIELD
|
||||
|
||||
``DEFAULT_AUTO_FIELD``
|
||||
----------------------
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Default: ``'``:class:`django.db.models.AutoField`\ ``'``
|
||||
|
||||
Default primary key field type to use for models that don't have a field with
|
||||
:attr:`primary_key=True <django.db.models.Field.primary_key>`.
|
||||
|
||||
.. setting:: DEFAULT_CHARSET
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue