My understanding is that all migrations are wrapped in a transaction, meaning, if a change for 1 row, like adding null: false, in a table fails, every other row will fail. When would you not want this to happen with disable_ddl_transaction
?
All migrations are wrapped in transaction by default so that they can be rolled back when they are failed.
You need to use disable_ddl_transaction
when you want to do something that can not excute inside a transaction. You can check Transactional Migrations
section of Migration document for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With