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
Post a Comment