On 24/04/2018 5:50 AM, Tom Tanner wrote:
Hey all, I have a bunch of tables on my local Django project. I set up the project on my production server and ran `manage.py migrate`. That set up the tables, but now I want to move the rows from my local tables to the ones on the production server. Both local and production server use Postgres. Is there a Django way to move the table data to production?

Not unless someone has written one and made it available. I haven't googled that so I don't know.

My approach would be to dump and reload if you want identical databases in dev and prd. You are looking for pgdump to make a dump file and to load at the other end you probably want dropdb, createdb and psql.

It is worthwhile writing a couple of scripts to manage that.

Mike


--
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+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f65cd8eb-6399-4ee7-8830-84b19ea9b689%40googlegroups.com <https://groups.google.com/d/msgid/django-users/f65cd8eb-6399-4ee7-8830-84b19ea9b689%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0285a217-bb7f-1a4c-9b4d-fd847c837cf7%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to