I need to migrate my db from sqlite to mysql, and the various tools/scripts out there are too many for me to easily spot the safest and most elegant solution.
This seemed to me nice http://djangosnippets.org/snippets/14/ but appears to be 3 years since getting an update which is worrying..
Can you recommend a solution that is known to be reliable with Django 1.1.1 ?
The quickest and easiest way to convert SQLite to MySQL is by exporting an SQL Database to a Dump File, and then importing the SQLite Dump into MySQL Database. You can export an SQLite Database to Dump File using the . dump command.
SQLite is pretty fast. In some cases, literally orders of magnitude faster than, say, Postgres, which comes up as a go-to alternative among Djangonauts. As someone pointed out, it also supports lots of concurrency. It's a matter of whether your app falls under the 'some cases' or not.
MySQL and PostgreSQL work best with Django.
Execute:
python manage.py dumpdata > datadump.json
Next, change your settings.py to the mysql database.
Finally:
python manage.py loaddata datadump.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With