scoursen / django-softdelete

Soft delete for Django ORM, with support for undelete.
Other
376 stars 102 forks source link

Declare id to be BigAutoField explicitly #88

Closed littlebtc closed 2 years ago

littlebtc commented 2 years ago

Running makemigrations in Django 3.2+ with DEFAULT_AUTO_FIELD set to django.db.models.AutoField will generate extra migrations for this package, this PR will fix it.

Reason:

And since we need to maintain compatibility to more Django version and default_auto_field in AppConfig is only supported in 3.2+, we need to explicitly declare id field to both models. I had checked it should not generate extra migration in my cases.