App as Collection of Engines

I have an interesting idea for segmenting an app into various rails
engines
for easier development from a massive dev team and to allow each engine
to
connect to its own database instance. With that concept in mind I have
run
into a few complications that I was hoping for some guidance on.

  1. I would like each engine to define its database configuration, all
    the models in the engines inherit from a special base class that uses
    the
    establish connection to determine what database the models within
    that
    engine belong to.
  2. I want to leave the migrations in the engines, I do not want to
    move
    them to the main app by running engine:install. I have read that this
    part
    is fairly easy to do with rails 3.2+, but please correct me if I am
    wrong.
  3. I would like to run db:migrate from the main application, but
    modify
    the task so that it was intelligent enough to know what engine it was
    running the migrations for.