Opened 10 months ago

Last modified 2 months ago

#31007 assigned New feature

Make it possible to change the default AutoField to BigAutoField.

Reported by: Caio Ariede Owned by: Tom Forbes
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Tom Forbes Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This was initially proposed in this comment/PR: https://github.com/django/django/pull/8924#issuecomment-516792989

  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)

Change History (8)

comment:1 Changed 10 months ago by felixxm

Resolution: wontfix
Status: assignedclosed
Summary: Make it possible to change the default AutoField to BigAutoFieldMake it possible to change the default AutoField to BigAutoField.

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.

comment:3 Changed 3 months ago by Tom Forbes

Cc: Tom Forbes added

comment:4 Changed 3 months ago by Tom Forbes

Resolution: wontfix
Status: closednew

Re-opening as per the mailing list discussion where we have broad consensus, and a good two-phase plan of action.

comment:5 Changed 3 months ago by Tom Forbes

Owner: changed from Caio Ariede to Tom Forbes
Status: newassigned

comment:6 Changed 3 months ago by Tom Forbes

Has patch: set
Needs documentation: set

comment:7 Changed 3 months ago by Carlton Gibson

Triage Stage: UnreviewedAccepted

comment:8 Changed 2 months ago by Tom Forbes

Needs documentation: unset
Note: See TracTickets for help on using tickets.
Back to Top