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

If Group model has been swapped, django tries to create a new migration during makemigrations #23

Open
jacklinke opened this issue Dec 15, 2021 · 0 comments

Comments

@jacklinke
Copy link
Contributor

jacklinke commented Dec 15, 2021

Describe the bug
If the Group model is swapped, and then the makemigrations command is run, django attempts to create a 7th migration within django-automations

Expected behavior
Running makemigrations within an end-user's project should have no effect on django-automations. All migrations should be provided complete with the package.

Additional context
I think I've got the issue sorted out, which involves manual creation of a new migration with:

  • dependency on migrations.swappable_dependency(settings.get_group_model_setting()),
  • an AlterField operation modifying the interaction_group field with to=settings.get_group_model_setting()
  • and finally, change in django-automation's settings to how the group model is retrieved

The last thing I'm still trying to pin down is the testing. After I get that resolved, I'll submit a PR to correct the behavior.

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

1 participant