Are data definition transactions the same as regular transactions?
I want to write a migration that
- changes table A
- does some custom data migrations
- changes table B
Ideally this would all be inside the same transaction. Can I just stick it in an ActiveRecord migration and call it a day?
Yes, each migration is executed within a transaction. From the Migrations Guide:
So stick it in a migration and call it a day.