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

Have an option of disabling the automatic transaction in migrations #1068

Closed
dantownsend opened this issue Aug 20, 2024 · 0 comments · Fixed by #1069
Closed

Have an option of disabling the automatic transaction in migrations #1068

dantownsend opened this issue Aug 20, 2024 · 0 comments · Fixed by #1069
Labels
enhancement New feature or request

Comments

@dantownsend
Copy link
Member

When migrations are run, each one is automatically wrapped in a transaction.

This is useful behaviour the majority of the time, because it means the changes are rolled back if the migration fails half way through.

However, if writing a custom migration, which might involve complex logic, having direct control over the transaction can be beneficial.

We should add an option like wrap_in_transaction to MigrationManager, which defaults to True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant