﻿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
8249	Regression of ticket #6820 (at least when using with GeoDjango)	eugene.pervago@…	nobody	"It seems that the recent refactoring of introspection (changeset:8296) may have
introduced a regression of ticket:6820.

When running tests of an application that uses GeoDjango, all tables are created
correctly and fixtures manage to load without a problem. But the flush fails with the
following message:

{{{
Error: Database test_epervago_django couldn't be flushed. Possible reasons:
      * The database isn't running or isn't configured correctly.
      * At least one of the expected database tables doesn't exist.
      * The SQL was invalid.
    Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
    The full error:   insert or update on table ""maps_userprofile"" violates foreign key constraint ""maps_userprofile_user_id_fkey""
DETAIL:  Key (user_id)=(1) is not present in table ""auth_user"".
}}}

This is the output of django-admin.py sqlflush:
{{{
TRUNCATE ""auth_permission"", ""auth_group"", ""auth_user_user_permissions"", ""django_site"", 
""books_book"", ""django_content_type"", ""maps_district"", ""django_session"", ""auth_user_groups"", 
""maps_area"", ""maps_city"", ""maps_listing"", ""maps_state"", ""books_book_tags"", ""django_admin_log"", 
""maps_userprofile"", ""auth_group_permissions"", ""maps_userprofile_saved_listings"", ""maps_address"", 
""books_author"", ""books_publisher"", ""maps_area_districts"", ""auth_message"", ""books_tag"", ""auth_user"";
}}}
"		closed	Testing framework	dev		invalid	gis geodjango tests flush introspection regression		Accepted	0	0	0	0	0	0
