Last active
December 7, 2020 00:55
-
-
Save tombohub/79b922617fd9a6c8c5e362fe5c2673bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing Sqlite to Postgres Heroku Django | |
python manage.py dumpdata --exclude=contenttypes --exclude=auth.permission > datadump.json | |
# Change settings.py to your mysql | |
# Make sure you can connect on your mysql (permissions,etc) | |
python manage.py migrate | |
#Exclude contentype data with this snippet in shell | |
python manage.py shell | |
from django.contrib.contenttypes.models import ContentType | |
ContentType.objects.all().delete() | |
quit() | |
python manage.py loaddata datadump.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment