How does elastic beanstalk update my Rails database?

Ste*_* Ng 7 ruby-on-rails amazon-web-services amazon-elastic-beanstalk

I've deployed my rails app at Deploying a Rail Application to AWS Elastic Beanstalk

1) How can I reset my database as I did on my development environment?

rake db:drop
rake db:create
rake db:migrate 
Run Code Online (Sandbox Code Playgroud)

2) If I create a db migration file, would elastic beanstalk automatically run it?

Fel*_*cia -2

您可以使用 Elastic Beanstalk Extensions 自定义您的环境

http://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git

  • 根本不明白!db:create 何时运行?你能解释一下吗?我的应用程序上显示相同的错误,当我连接到数据库时它是空的。 (7认同)