L
L
lavezzi12015-08-11 21:56:28
Ruby on Rails
lavezzi1, 2015-08-11 21:56:28

How not to create a new table each time when deploying on heroku?

Hello. Let's say I added a new column to the table, deployed it to heroku, you need to do heroku run rake db:migrate. And, as I understand it, it does not add a column (as on a local server), but re-creates the entire table already with changes, which is extremely inconvenient when testing. There is a solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
M1Anderson, 2015-08-11
@M1Anderson

Didn't understand the problem.
db:migrateworks the same on heroku and on your computer, it does not erase the entire data base, as db:resetif you are talking about it. There shouldn't be any problems with testing.

C
CapeRatel, 2015-08-12
@CapeRatel

I suspect that during the deployment, uploaded files or photos are falling))) If yes, then this is not a problem in the database) This is your public folder being overwritten.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question