open:default-auto-field

DEFAULT_AUTO_FIELD

brand.User: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
        HINT: Configure the DEFAULT_AUTO_FIELD setting or the BrandConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

# settings.py

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

기존대로 유지하고 싶은 경우에는

# settings.py

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

  • open/default-auto-field.txt
  • 마지막으로 수정됨: 2021/06/24 04:26
  • 저자 127.0.0.1