[Rails] Re: Different DB connections for migrations vs. running app.

Wes Gamble weyus at att.net
Tue Aug 8 21:54:13 GMT 2006


This seems to work.  I did the following:

Set up a new DB profile named prod_migrate that was only different than 
the existing production profile because of username/password.

Copied the config/environments/production.rb file to 
config/environments/prod_migrate.rb

and I was able to migrate into production using:

rake db:migrate RAILS_ENV=prod_migrate

I'm under the impression that the config/environments/xxx.rb file is 
necessary in case you've made sweeping configuration changes to the way 
that database tables and stuff are handled.  Otherwise, it's a bit of a 
pain.

Wes


-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list