Answers for "how to migrate from sqlite to postgresql django"

1

how to migrate from sqlite to postgresql django

# when using sqlite3
python manage.py dumpdata > datadump.json
# after chagne db
python manage.py makemigrations
python manage.py migrate --run-syncdb
python manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
python manage.py loaddata datadump.json
Posted by: Guest on September-08-2021

Code answers related to "how to migrate from sqlite to postgresql django"

Python Answers by Framework

Browse Popular Code Answers by Language