1. I really like the proposed approach of having a `DEFAULT_AUTOFIELD`
setting.
2. For backwards compatibility, when `DEFAULT_AUTOFIELD` is not set, we
should keep the default behavior: `django.db.models.AutoField`
3. Whenever this setting is changed, it would affect all existing AND new
fields (pk and fk)
--
Ticket URL: <https://code.djangoproject.com/ticket/31007>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: assigned => closed
* resolution: => wontfix
Comment:
I think we need a discussion and consensus on the DevelopersMailingList
before we move forward with this ticket. Adding a new setting is always a
bit controversial and changing the "default" `AutoField` for all tables is
a complicated and error-prone task. That's why we need a clear path, I'm
closing before we finish a discussion.
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:1>
Comment (by Tom Forbes):
Proposal: https://groups.google.com/d/msg/django-
developers/MBPEPKlibGQ/F4i6JPvBAAAJ
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:2>
* cc: Tom Forbes (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:3>
* status: closed => new
* resolution: wontfix =>
Comment:
Re-opening as per the mailing list discussion where we have broad
consensus, and a good two-phase plan of action.
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:4>
* owner: Caio Ariede => Tom Forbes
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:5>
* needs_docs: 0 => 1
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/13179
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:6>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:7>
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:8>
* needs_better_patch: 1 => 0
Comment:
Addressed review comments and improved the implementation a bit.
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:10>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:11>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:12>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b5e12d490af3debca8c55ab3c1698189fdedbbdb" b5e12d49]:
{{{
#!CommitTicketReference repository=""
revision="b5e12d490af3debca8c55ab3c1698189fdedbbdb"
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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:13>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"f07723aa0a094d55cc47417492046d613c6ab349" f07723aa]:
{{{
#!CommitTicketReference repository=""
revision="f07723aa0a094d55cc47417492046d613c6ab349"
Refs #31007 -- Added test for check for specifying type of auto-created
primary keys from abstract models.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31007#comment:14>