jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.13k stars 259 forks source link

Default auto field not configured #396

Closed con-cat closed 3 years ago

con-cat commented 3 years ago

In Django 3.2, you can customise the type of auto-created primary key fields by configuring DEFAULT_AUTO_FIELD in your settings.

My project has recently been upgraded to Django 3.2, and I set DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField', because Django is making this the new default (previously it was AutoField). However, after doing that, the makemigrations command generates migrations to change this for dependencies that don't have a default configured, as well as first-party apps.

My project runs makemigrations --check in CI, and that now fails because it thinks waffle is missing a migration.

This could be addressed by adding default_auto_field = 'django.db.models.AutoField' to WaffleConfig - I'd be happy to make a PR to do that.

This also relates to issue #395

clintonb commented 3 years ago

Please create a PR.

con-cat commented 3 years ago

@clintonb I've made a PR :)