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.
django.db.utils.ProgrammingError: (1146, "Table 'main.socialaccount_socialapp_sites' doesn't exist")
-
not much to go on... Do you have different types of databases between dev and prod? Does your prod db allow periods in the name? Do you see any error messages when running the migrations?Tim Tisdall– Tim Tisdall2022-07-06 15:06:15 +00:00Commented Jul 6, 2022 at 15:06
Add a comment
|
1 Answer
Checklist
- run
showmigrationsto see which migrations are done. - if the relevant migration containing the table appears to be migrated, rollback and run
migrateagain. - 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
dbshellor 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.
1 Comment
Kikito
please let me know if you got more questions!