I need to migrate a complex project from sqlite to PostgreSQL. A lot of people seems to have problem with foreign keys, data truncature and so on...
Another way of doing this may be to use multiple databases.
http://docs.djangoproject.com/en/dev/topics/db/multi-db/
It is important you read this section.
http://docs.djangoproject.com/en/dev/topics/db/multi-db/#moving-an-object-from-one-database-to-another
From what I understand that means that provided there is no data in your new DB, from fixtures for example you could do
queryset = MyModel.objects.using("old-db").all()
for obj in queryset:
obj.save(using="new-db")
Because that should preserve the primary keys I don't think there'd be any foreign key issues.