How to run "rake db: drop" in Elastic Beanstalk

I have a rails application running on the Elastic Beanstalk service.

When I deploy my application, some pages do not work. I think the problem is that after deleting the model and creating a new model with the same name but with a different schema, the database was not reset.

The local I can run rake db:drop, rake db:create, rake db:migrateto reset the database. However, how to reset the EB database?

+4
source share
2 answers

to start it manually, you can simply eb sshcreate your own environment and issue commands rake. Alternatively, if you do not need this db, simply recreate the environment from the beanstalk web console, which recreates the db.

+2
source

I think you also need to remove the file manual structure.rbfrom the rails application and create it again usingrake db:migrate

0
source

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


All Articles