Skip to content

Commit

Permalink
fix: Set the default_auto_field
Browse files Browse the repository at this point in the history
Django gives a warning if there is no default auto field set.
Maintaining the historical behavior, the default value for
DEFAULT_AUTO_FIELD is AutoField. We are setting this value to avoid
unwanted migrations for users.
Starting with Django 3.2 new apps are generated with
AppConfig.default_auto_field set to BigAutoField.
See https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
  • Loading branch information
b1rger committed Apr 27, 2023
1 parent d30e68f commit 55465d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apis_bibsonomy/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@


class EntitiesConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
name = 'apis_bibsonomy'

0 comments on commit 55465d2

Please sign in to comment.