Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEFAULT_AUTO_FIELD introduced in Django 3.2 behaviour #435

Closed
saevarom opened this issue Oct 17, 2022 · 2 comments
Closed

DEFAULT_AUTO_FIELD introduced in Django 3.2 behaviour #435

saevarom opened this issue Oct 17, 2022 · 2 comments

Comments

@saevarom
Copy link

saevarom commented Oct 17, 2022

I'm in the process of upgrading a project to Wagtail 4 and Django 4.1. This is a project created with Django 3.1 but later upgraded to 3.2 and now 4.1.
I have been using the DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' for a few months without problems.

After the upgrade, when I run makemigrations, Django detects changes in wagtailmenus models that do not have migrations and creates a migration file in the site-packages directory:

Migrations for 'wagtailmenus':
  /usr/local/lib/python3.10/site-packages/wagtailmenus/migrations/0024_alter_flatmenu_id_alter_flatmenuitem_id_and_more.py
    - Alter field id on flatmenu
    - Alter field id on flatmenuitem
    - Alter field id on mainmenu
    - Alter field id on mainmenuitem

I'm not sure if this is expected behaviour, I find it kind of strange that my project is creating migration files in third party package folders.

Maybe wagtailmenus needs to explicitly set the auto field for the models?

@MrCordeiro
Copy link
Contributor

Hello, we've just released a new version that solved this issue.

@saevarom
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants