Skip to content

Instantly share code, notes, and snippets.

Last active December 7, 2020 00:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tombohub/79b922617fd9a6c8c5e362fe5c2673bf to your computer and use it in GitHub Desktop.
# Importing Sqlite to Postgres Heroku Django
python dumpdata --exclude=contenttypes --exclude=auth.permission > datadump.json
# Change to your mysql
# Make sure you can connect on your mysql (permissions,etc)
python migrate
#Exclude contentype data with this snippet in shell
python shell
from django.contrib.contenttypes.models import ContentType
python loaddata datadump.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment