rails/rails — Issue #3497: Migrations schema_migrations with multiple databases
Author: joshuanapoli
Created: 2011-11-02 22:00:24+00:00
State: open

I would like to isolate the database for an Engine from its application. The Engine has migrations, which I can direct to the Engine database (overriding Migration#connection). However, the application's schema_migrations table is always used. The schema_migrations table is hard-coded to ActiveRecord::Base.connection in several places in ActiveRecord::Migration.

I think that the connection for schema_migrations should be controlled by a single method, say Migration#schema_migrations_connection. Then it would be possible to configure the schema_migrations table to live in the same database as the tables being migrated.