I am attempting to reset my database on heroku using this:
heroku pg:reset SHARED_DATABASE
and then run:
heroku run rake db:create db:migrate db:seed
But I am getting the following error:
Validation failed: Email has already been taken
I have noticed by going into the heroku rails console that the users are not being dropped and thus this validation has failed. What am I missing here?
Heroku does not perform and scheduled credential rotation for Common Runtime databases. However, during certain types of maintenance events (for example patching for security) the credentials will be rotated automatically.
A handy feature of the Heroku Postgres database is that it allows for easy experimentation or prototyping. Heroku even offers a free plan for hosting PostgreSQL databases.
Try this:
heroku pg:reset SHARED_DATABASE --confirm {the name of your app}
Substitute the name of your app where I have written {the name of your app}. For example, if your app is called my_great_app then you use:
heroku pg:reset SHARED_DATABASE --confirm my_great_app
To recreate the database with nothing in it:
heroku rake db:migrate
To populate the database with your seed data:
heroku rake db:seed
You can combine the last two into one action by executing this:
heroku rake db:setup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With