When you run syncdb in Django, the primary keys of the content types will be recomputed. If I create new models, the next time I run syncdb, the primary keys of the content types will be different.
If I have an application running in production, how can I update the database with the new models and keep the integrity of content type pks?
Running syncdb
doesn't update existing ContentType values - these are stored in the database and aren't changed. So relations that depend on them won't be affected.
Newly defined models will however get new ContentType values when you run syncdb, and there's currently no way of defining in advance what those will be. As Ludwik points out, this issue is solved in 1.2.