Rails and Heroku - Destroy a single record from production database -


is possible destroy single record production pg database using activerecord command console? know can locally running following command in rails console:

> user.find(1).destroy 

however, have tried running production db:

> heroku run rake user.find(1).destroy 

but not work. appreciated. thanks!

run console on heroku first with:

$ heroku run rails console 

then can delete record same query:

> user.find(1).destroy 

if there multiple apps configured folder, have specify app --app=<app name> in heroku command line:

$ heroku run rails console --app=<app name> 

Comments

Popular posts from this blog

php - Wordpress: Link a post to posts of another category manually -

delphi xe7 upload/download dropbox file using the rest client and show progress -

java - Get more than One value and display it -