top of page

Python Assignment Help - How Migrate a Django DB from SQLite to MySQL or PostgreSQL? | DB Migration

Step 1:

Creating Dump file of existing data.

>python3 dumpdata>datadump.json


Change to Postgres backend.


Make sure you can connect on PostgreSQL. Then:


python3 migrate --run-syndb


Run this on Django shell to exclude contentype data

>python shell

>>> from django.contrib.contenttypes.models import ContentType

>>> ContentType.objects.all().delete()

>>> quit()

Finally load data by using this

>python3 loaddata datadump.json

If you like Codersarts blog and looking for Programming Assignment Help Service,Database Development Service,Web development service,Mobile App Development, Project help, Hire Software Developer,Programming tutors help and suggestion  you can send mail at

Please write your suggestion in comment section below if you find anything incorrect in this blog post

#Python #PythonAssignmentHelp #PythonDataMigration #PythonAssignmentHelp #PythonHomeWorkHelp

3 views0 comments
bottom of page