Run migrations in a transaction.