Cmd line arg to specify DB for rake migrate?

10 views
Skip to first unread message

jmcguckin

unread,
Nov 20, 2012, 3:33:25 PM11/20/12
to rubyonra...@googlegroups.com
I want to say 

   bundle exec rake db:migrate

but, I don't want to use the default database. Is there a command line argument I can use?

Thanks,

Joe

Walter Lee Davis

unread,
Nov 20, 2012, 3:47:35 PM11/20/12
to rubyonra...@googlegroups.com
If you define an environment for it in database.yml, then you can just do this:

rake db:migrate RAILS_ENV=my_production

Walter

>
> Thanks,
>
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/35vgYhWtrfIJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages