Answers for "import sqlite to mysql django"

0

import sqlite to mysql django

python3 manage.py dumpdata > datadump.json
# configure your DATABASES in settings.py
python3 manage.py migrate --run-syncdb
# exclude contenttype data !IMPORTANT

python3 manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()

# import data 
python3 manage.py loaddata datadump.json
Posted by: Guest on September-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language