agateblue / django-dynamic-preferences

Dynamic global and instance settings for your django project
https://django-dynamic-preferences.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
346 stars 86 forks source link

Add missing migration #277

Closed kikeh closed 2 years ago

kikeh commented 2 years ago

Fixes #276

kikeh commented 2 years ago

@agateblue I just realized that it may happen because both apps are missing the default_auto_field property and in our project we are using BigAutoField and not AutoField. So it may not happen to everyone. I'll try adding that property, see if works and update the PR ;)

agateblue commented 2 years ago

@kikeh yes, just realized that too. Maybe it would be better for backward compatibilty to simply add a default_auto_field = "django.db.models.AutoField" in dynamic_preferences.apps and dynamic_preferences.users.apps? I assume it would remove the migration warning, while preserving current table structure for everyone, regardless of their default django auto field class.

kikeh commented 2 years ago

Maybe it would be better for backward compatibilty to simply add a default_auto_field = "django.db.models.AutoField" in dynamic_preferences.apps and dynamic_preferences.users.apps?

Yes, that's what I want to try, but I'm pretty sure it will work!

kikeh commented 2 years ago

Ok, it looks like it works, I'm closing this and opening a new PR, thanks :)