Open clayton opened 14 years ago
I found that this does work if you setup your database.yml entries for the third party like so:
third_party_db_production: adapter: mysql database: third_party username: root password: host: 127.0.0.1 third_party_db_production_slave_database: adapter: mysql database: third_party username: root password: host: 127.0.0.1
Can multi_db support the following scenario?
In this example multi_db works just fine for the user model. However, multi_db either ignores or overrides the establish_connection call made in the Team model that is trying to use a connection to a different database. This results in a MySQL error similar to "Mysql::Error: Table 'production.teams' doesn't exist" because teams is not defined in the database named 'production' but rather in the database named 'third_party_db'.