Possibility to execute migration outside of transaction
See original GitHub issueSome SQL commands can’t be executed in the scope of transaction. E.g. psql ALTER TYPE ...
. I suggest to add possibility to disable wrapping particular migration in the transaction. It can be configured via some flag in the migration file name, or via special comment inside the migration, e.g. -- tx off
.
I’m ready to submit PR in case this changes are welcome and we agree on configuration option.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:22 (10 by maintainers)
Top Results From Across the Web
How do I run a migration without starting a transaction in ...
An extremely simple, Rails-version-independent (2.3, 3.2, 4.0, doesn't matter) way about this is to simply add execute("commit;") to the ...
Read more >Run some migration revisions outside of a transaction
The problem is that 4 is an operation that can't be in a transation, specifically CREATE INDEX CONCURRENTLY from Postgres (synchronous creation ...
Read more >Run Migrations Outside of a Transaction
When we run migrations without a transaction, it is only valid in few situations, but we'll want to do this carefully. It could...
Read more >Migrations - Flyway
Within a single migration run, repeatable migrations are always applied last, after all pending versioned migrations have been executed.
Read more >Applying Migrations - EF Core
Strategies for applying schema migrations to production and development databases ... Each migration is applied in its own transaction.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You EXEC in the comment ?
This is the migration script:
-- evolve-tx-off EXEC StoreFileGroupTest;