Skip to content

Instantly share code, notes, and snippets.

@mrhwick
Created October 28, 2020 02:32
Show Gist options
  • Save mrhwick/5678bf0e5ef4629465a76c727cd558e4 to your computer and use it in GitHub Desktop.
Save mrhwick/5678bf0e5ef4629465a76c727cd558e4 to your computer and use it in GitHub Desktop.
pg_dump -d rcfbpoll -t social_* > social_dump.sql
psql -U postgres -d rcfbpoll -c "drop table social_auth_association;"
psql -U postgres -d rcfbpoll -c "drop table social_auth_code;"
psql -U postgres -d rcfbpoll -c "drop table social_auth_nonce;"
psql -U postgres -d rcfbpoll -c "drop table social_auth_usersocialauth;"
psql -U postgres -d rcfbpoll -c "drop table social_auth_partial;"
pip uninstall social-auth-app-django social-auth-core --yes --no-input
pip install social-auth-app-django
psql -U postgres -d rcfbpoll -c "delete from django_migrations where app='default';"
psql -U postgres -d rcfbpoll -c "delete from django_migrations where app='social_auth';"
psql -U postgres -d rcfbpoll -c "delete from django_migrations where app='social_django';"
python manage.py migrate
psql rcfbpoll -f social_dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment