﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7052	Add support for natural key serialization	Jay Hargis	nobody	"If you perform a fixture dump on auth, so as to have users in your test database to perform unit testing.  When you try to run the test server, telling it to load the auth fixture, it *can fail.  I turned the logging in PostgreSQL to log every query, and found that it was a foreign key violation that was causing the failure.  Further investigation seemed to indicate that since I had altered data in auth_permission and django_content_type by hand, resulting in the sequence of primary keys becoming non sequential, this was causing the problem. 

When these tables are rebuilt during test db creation, the id column of the rows do not end up with the same id's as they did in the database which created the fixture.  I don't know if this is related, but as far as I could tell it was simply a matter of the id's in these two tables not being 100% sequential.  I ended up dumping all the data out, then creating the database and repopulating it in a linear fashion (with respect specifically to those two tables).  This fixed the problem and the test server happily created and populated those tables.

If you never alter these tables by hand, the id's should always remain sequential and this problem will not occur."	New feature	closed	Core (Serialization)	dev	Normal	fixed	auth_permission auth_content fixture import	daevaorn@… bsn.dev@… greg@… Manuel Saelices russ.amos@… winhamwr@… Carl Meyer Michael Manfre sanfordarmstrong@… juan@… simon@… kmike84@… chris@… jashugan@… robmadole@…	Accepted	1	0	0	0	0	0
