Rails 3: Heroku run rake db:drop db:create db:migrate db:seed
Hi All,
Currently I will share to you about resetting the database on heroku. As default heroku use pg database.
When you want to run db:drop db:create db:migrate db:seed as follow:
1. When you want the drop table
heroku pg:reset DATABASE --confirm calm-ravine-2846.
The calm-ravine-2846 is my apps on heroku.
2. When create database
heroku run rake db:create
3. When migrate table
heroku run rake db:migrate
4. When seed data
heroku run rake db:seed
I hope this article can help you guys. :)
Currently I will share to you about resetting the database on heroku. As default heroku use pg database.
When you want to run db:drop db:create db:migrate db:seed as follow:
1. When you want the drop table
heroku pg:reset DATABASE --confirm calm-ravine-2846.
The calm-ravine-2846 is my apps on heroku.
2. When create database
heroku run rake db:create
3. When migrate table
heroku run rake db:migrate
4. When seed data
heroku run rake db:seed
I hope this article can help you guys. :)
Komentar
Posting Komentar
terimakasih komentarnya