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

Can't toggle DDL Transactions selectively for individual migrations #819

Open
1 of 3 tasks
tiagonbotelho opened this issue May 17, 2023 · 3 comments
Open
1 of 3 tasks

Comments

@tiagonbotelho
Copy link

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Current behavior

At the moment we seem to need to use a --non-transactional flag in order to be able to disable DDL transactions from running on a migration. However, it seems that if we only want to do this for a specific migration and not the entire suite, that currently isn't possible.

Expected behavior

Similar to Rails ActiveRecord disable_ddl_transaction! it should be possible to disable the DDL transaction from a specific migration without affecting the entire suite

Environment


db-migrate version: 0.11.3
plugins with versions: `db-migrate-pg` 1.2.2
@wzrdtales
Copy link
Member

yes correct, this is not currently possible. The only ugly work around is issuing a stop to the transaction at the beginning and begin a new at the end of your migration.

@tiagonbotelho
Copy link
Author

@wzrdtales thank you for your response, do you happen to know if this would be something that could ever be prioritised to make its way into the package by any chance? 😊

@wzrdtales
Copy link
Member

PRs are always welcome if you want to give it a shot :)

This feature request in general would probably not be prioritised very soon. The only other alternative would be a payed feature request, should that be business critical to you/your company.

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