Hello all, What are your experience and thoughts on running migrates on a production environment? Since Rake is using the configuration from database.yml it uses the same username as my Rails app. So if my migrates are altering the database (add columns, etc.) this user has to be granted with drop, create and alter rights. But when running the Rails application I want this user to only have enough right to perform SQL actions. At the moment I'm thinking about executing the migrates in a pre-production environment and then exporting the database.
on 2007-02-15 15:17
on 2007-02-15 19:33
On 2/15/07, Patrick Baselier <email@example.com> wrote: > But when running the Rails application I want this user to only have > enough right to perform SQL actions. I'm not sure if this would work or not, but couldn't you create a separate environment to run your migrations in? Add another entry to database.ymlfor that environment with the production database and a different username. Then all you need to do is force you migrations to run in this "new" environment. Not exactly sure how to make all this work, but it seems like it should be feasible. At the moment I'm thinking about executing the migrates in a > pre-production environment and then exporting the database. > > -- > Posted via http://www.ruby-forum.com/. > > > > HTH, Michael Guterl