I have a Django project with 5 different PostgreSQL databases. The project was preemptively separated in terms of model routing, but has proven quite problematic so now I'm trying to reverse it. Unfortunately, there's some overlap of empty, migrated tables so pg_dump's out of the question. It looks like django-dumpdb may suit my needs but it doesn't handle per-database export/import. Additionally, Django's dumpdata/loaddata are installing 0 of the records from generated fixtures. Can I have some suggestions as to the least painful way to merge the data?
I had a similar issue, two identical websites sharing several models but with different objects. Unfortunately, merging them by natural_key was impossible.
I had to implement a new django commands similar to loaddata, in order to append all models from the second website into the first one.
You can find the code of the solution in this gist:
https://gist.github.com/MattFanto/f6c0ee0bc392da1d0d90f28efdb77e40
there's always the dump data from django, which is pretty easy to use.
or you could do this manually: