---
status: accepted
---
# Non-transactional migrations run alone in autocommit mode

Some SQL statements (such as `CREATE INDEX CONCURRENTLY` in PostgreSQL) refuse to run inside a transaction. A migration may therefore declare `transactional = false`. The runner groups consecutive transactional migrations into one transaction, and gives each non-transactional migration its own batch with the connection switched to autocommit. The cost is that a failure in a non-transactional migration cannot be rolled back, which the author accepts by setting the flag.
