I have already made my project in Django and used built-in database Sqlite and now I want it in production on heroku so how can I switch all data from Sqlite database to Postgresql database?Â
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADsP_iywX5jsBNRsoSgtPZtzgDD3befGdJgjWL-XgZi-feRdAA%40mail.gmail.com.
I have already made my project in Django and used built-in database Sqlite and now I want it in production on heroku so how can I switch all data from Sqlite database to Postgresql database?Â
python manage.py dumpdata contenttypes --indent=2 --natural-foreign > contenttype.json
python manage.py dumpdata --indent=2 --natural-foreign --exclude contenttypes > everything_else.json
In the destination server
python manage.py loaddata contenttype.json
python manage.py loaddata everything_else.json
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJY8mfyKgnhPUNL6dbLcsZgMK%2BEQ2aQnt7B0wUOEu1thi33%3Dpw%40mail.gmail.com.