revsys / django-health-check

a pluggable app that runs a full check on the deployment, using a number of plugins to check e.g. database, queue server, celery processes, etc.

Home Page:https://readthedocs.org/projects/django-health-check/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django 3.2 DEFAULT_AUTO_FIELD Warning

tmm opened this issue · comments

Django 3.2 wants either DEFAULT_AUTO_FIELD to be set globally or default_auto_field in app config, otherwise the following warning shows up:

WARNINGS:
db.TestModel: (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 HealthCheckConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

I can open a PR that adds a default to the app config if that works.

Hi @tmm

Good call. Please go for it!

Best,
Joe

@codingjoe Awesome - have something for you #292