-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add ability to run migrations outside of a transaction #277
Comments
Hi, and thanks for your interest! |
Hey @jxs - I'd definitely be interested in that! Thank you for the starting points about the Transaction trait. That makes sense for the point where we can execute the migration either within or outside of a transaction and I'll start working on implementing that. As far as how a user would configure that setting on a migration SQL file, do you have any preferences to the design/approach? I saw in the README that refinery's design is based on Flyway, so should we use the same approach via script config files? Such that each migration |
I'd go for We can do it parsing the migration file. Ideally we could use As this will most likely decrease performance, I'd also add a flag on the |
…#1) - Required implementations to use `sqlx::PgPool` as the driver for embedded Rust migrations. - Addresses rust-db#277 by adding the ability to annotate a SQL or Rust migration with `refinery:noTransaction`, which will make the migration be applied outside of a transaction when not grouping unapplied migrations.
This would be useful (and needed) for certain commands that cannot be ran within a transaction, such as
CREATE INDEX CONCURRENTLY
in postgres.This would ideally be something that could configured per migration file, similar to how goose has the ability to mark migration files with a
-- +goose NO TRANSACTION
comment or how Flyway provides aexecuteInTransaction
setting in script config files.The text was updated successfully, but these errors were encountered: