Multiple database sources with Rails 2.2.2

I too am trying to do this. It seems like something that should be easily configurable. establish_connection :blah seems to work fine in the model, however causes problems in the migration used to create that model ActiveRecord::Base.establish_connection :blah

The migration completes successfully but then an exception is thrown:

rake aborted! An error has occurred, this and all later migrations canceled:

not connected

Tasks: TOP => db:migrate