Resetting Database error - Django Series Part 1

I followed the below steps after watching the mosh video - Resetting Database error. I tried for 3 days to solve the error but the error didn’t resolve. Please help me.


  1. Dragged and dropped storefront folder from resources in VS code
  2. Changed password in → Database
  3. Run pipenv install in cmd
  4. Deleted database storefront in datagrip
  5. Created New database storefront in localhost
  6. Activated virtual environment - pipenv shell
  7. Run python migrate
  8. Refreshed data in datagrip
  9. Closed all sessions
  10. Dragged and dropped seed.sql file from data in resources
  11. Selected schema - storefront. Selected all and executed them all.

Try closing and reopening vscode / datagrip and/or rebooting your system before running the steps again

If it still doesn’t work you may need to go right back and re-install mysql to make sure everything is installed properly and has correct settings. If your on windows machine be sure to download the community installer here

It may be that you already have a product with PRIMARY_KEY id = 2 in your store_collection table.
I’d suggest jumping into your database and having a look at the data stored in the store_collection table.

IF you have data stored with id = 2 just remove it from the table then run the process again.

Link to previous tries from Vinodh’s last post on the topic, for reference:

1 Like

Thank you for all your help. I got it resolved by changing/activating the new django ORM virtual environment in VS code.


Great to hear your back on track do let us know if you require further help

1 Like