I want to have 2 databases on one app. From Connecting Rails 3.1 with Multiple Databases I know how to set it up on my local machine and I know how to link to a different heroku database by changing the env vars. But since my database.yml looks like
development:
adapter: postgresql
database: first_database
log_development:
adapter: postgresql
database: second_database
production:
adapter: postgresql
I do not know how to link the production app to two different database since the production gets the location of the database from DATABASE_URL env. I would need a DATABASE_URL2 and someway to tell production to use either env variable dynamically.