What's the best way to migrate a Django DB from SQLite to MySQL?
After some hard searching I got several problems that I hope future answer looking people will find useful.
my formula is
python manage.py dumpdata > datadump.json
- Change settings.py to your mysql
- Make sure you can connect on your mysql (permissions,etc)
python manage.py migrate --run-syncdb
Exclude contentype data with this snippet in shell
python manage.py shell
from django.contrib.contenttypes.models import ContentTypeContentType.objects.all().delete()quit()
python manage.py loaddata datadump.json
Hope that will help you!