0

We need constantly update our database schema in production for rails 3.1.3 app. The first db schema was created with the following rails command:

$rake RAILS_ENV=production db:schema:load

Question is: can we still use the command above to update db schema in production while safely retaining all current data?

Thanks so much.

user938363
  • 9,990
  • 38
  • 137
  • 303

1 Answers1

1

I never used rake db:schema:load in production, but according to this answer to another question here on SO, I don't think you want to do that.

On the other hand, I have used RAILS_ENV=production rake db:migrate several times on the server with data already in the database and never experienced any problems.

Community
  • 1
  • 1
klaffenboeck
  • 6,297
  • 3
  • 23
  • 33
  • Tried db:migrate. It ran through each and every db migrations in the system. Current data disappeared after migrate. There seems a possibility that the current data can not be retained. – user938363 Apr 13 '12 at 15:39