﻿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
19677	SQLite can't introspect recursive fks	Simon Charette	Aymeric Augustin	"SQLite's `get_key_columns` relies on the presence of inline `REFERENCES` clauses in table definitions to work properly.

However, since those are not created by `BaseDatabaseCreation.sql_for_inline_foreign_key_references` for recursive fks and there's no support for foreign keys on SQLite [https://code.djangoproject.com/ticket/19659 yet], `sql_for_pending_references` does nothing.

I'm attaching a patch that makes sure to add references on table creation with introspection assertions. It passes on all elements of `product(['Python 2.7.3 ', 'Python 3.2.3 '], ['SQLite3', 'Postgresql 9.1'])`

I stumbled upon this issue while trying to write tests for #19676 under a TestCase which `@skipUnlessDBFeature('can_introspect_foreign_keys')`."	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	1	0	0	0	0	0
