django.db.utils.ProgrammingError: (1146, "Table 'main.socialaccount_socialapp_sites' doesn't exist")

I'm trying to implement Google Login on my Django production website. It works fine on development server, but on my production server, I face this issue after having run python manage.py migrate. I'm not sure what to do, I already tried deleting all the migrations and re-running makemigrations and migrate.

Upvotes: 0

Views: 305

Answers (1)

Kikito
Kikito

Reputation: 224

Checklist

  • run showmigrations to see which migrations are done.
  • if the relevant migration containing the table appears to be migrated, rollback and run migrate again.
  • when you want to regenerate migration files, you need to first rollback while you have the old migration files.
  • if you'd like to check which tables exist, use dbshell or other shell depending on the database you're using.

Other things

I would not recommend regenerating migration files just because there is some db issue.

Upvotes: 1

Related Questions