How to safely update the production database schema on rails 3.1.3?

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

$rake RAILS_ENV=production db:schema:load

Question: can we use the above command to update the db schema during production, while preserving all current data?

Many thanks.

0
source share
1 answer

I have never used rake db:schema:loadin production, but in accordance with this answer to another question here on SO, I don’t think you want to do that .

, RAILS_ENV=production rake db:migrate .

+1

Source: https://habr.com/ru/post/1525993/


All Articles