views:

44

answers:

1

I am trying to move dumped data from postgresql database to another. However, when syncdb is run on django, it inserts some values into the database. When I then want to insert the dump into the database, I get conflicts. What is the right way of moving some data from one django built database to another?

+1  A: 

Get rid of syncdb, instead perform a normal database dump and restore it on the other database

Simon
I am also migrating from 1.1 to 1.2. Won't I break anything?
gruszczy
I don't know - just check it.You can always perform syncdb on the new database and compare the databases. First of all compare the structure, simple pg_dump from both databases and diff should work.Then you just could the same way perform dump of each table from one database and another and compare them.This way you should be able to do just the syncdb on the new database and load the prepared sql script to load missing data.Or maybe just look carefully at the errors that you've got, maybe it would be enough just to fix them.
Simon
Thanks, sounds reasonable :-)
gruszczy