简体   繁体   中英

Heroku - Need to change the original 'seeded' user

I have a Rails application deployed to Heroku . The db/seed file has since change, and I would like the admin user that was originally seeded into Heroku to reflect the one I now have locally. Is there a way to either:

A) Destroy the data, and just run heroku run rake db:seed again? or

B) Seed a new admin user into the database. Similar to creating a new migration file if I needed to edit the table in the database?

Thanks!

You can definitely reset your database using the rake db:reset command which will drop, create and seed your data. You would have to modify your seed file before running this command.

However, the better method would be to use heroku run rails console and simply modify the user information using that interface. You can read more here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM