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

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

CodersArts is a Product by Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram