I have need to migrate some sqlite3 databases to mysql for a couple django-cms projects at work. Typically in the past
I’ve used fixtures in Django to get this done, but I usually have to align the planets and concoct the elixir of
life to get the fixtures to migrate properly. It usually has to do with foreign key errors something. This is something
that should just be easy, but in my experience with Django, it never is.
#! /usr/bin/env python
$ sqlite3 mydb.sqlite .dump | python convert.py > out.sql
Thank you Behrang Noroozinia from internet land, you solved a long-standing problem of mine.