﻿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
9717	manage.py flush raises error if there are unsynchronized applications	Russell Keith-Magee	nobody	"If an application has been added to INSTALLED_APPS, but has not yet been synchronized, ./manage.py flush will raise a ""no such table:"" error.

How to reproduce:
 1. Create a new project with a bunch of apps
 2. Call manage.py syncdb
 3. Add some new apps to INSTALLED_APPS (e.g., add contrib.admin to the list)
 4. Call manage.py flush

This will raise an error because the tables for contrib.admin haven't been created, but the flush command will try to delete those tables. 

The solution here will be to check the tables that already exist in the database before attempting to destroy them. Syncdb already does a version of this, checking the tables that already exist before trying to create; the same logic needs to be applied to flush.

"		closed	Core (Management commands)	1.0		fixed		oliver@…	Accepted	0	0	0	0	0	0
