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

Fix migrations failing when no statuses exist and other various migrations fixes #277

Merged
merged 7 commits into from
Oct 9, 2024

Conversation

gsnider2195
Copy link
Contributor

@gsnider2195 gsnider2195 commented Oct 8, 2024

Closes #272

  • In migrations only create statuses that are configured in the plugin settings default_status and allowed_status if they don't already exist. Associate all firewall models that have a status field to these statuses through the content_types field.
  • In database_ready signal, create statuses that are configured in the plugin settings default_status and allowed_status. Associate all firewall models that have a status field to these statuses through the content_types field.
  • In database_ready signal, associate all firewall models that have a status field to the Active, Staged and Decommissioned statuses. Skips any of these statuses if they don't already exist. This logic was removed from multiple migrations

@gsnider2195 gsnider2195 changed the title U/gas 272 migrations failure Fix migrations failing when no statuses exist and other various migrations fixes Oct 8, 2024
Copy link
Contributor

@smk4664 smk4664 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great and resolves the issue with migrations.

@gsnider2195 gsnider2195 merged commit d428291 into develop Oct 9, 2024
13 checks passed
@gsnider2195 gsnider2195 deleted the u/gas-272-migrations-failure branch October 9, 2024 20:10
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

Successfully merging this pull request may close these issues.

Migration Can Fail if Status Doesn't Exist
3 participants