﻿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
2225	'manage.py sql ...' gets confused when using tables from separate apps	Lucas Hazel	nobody	"An error message is given when using tables from a separate app if the table doesn't previously exist.

For example:
{{{
# project.app_a.models
class A(models.Model):
    # ....

# project.app_b.models
from project.app_a.models import A
class B(models.Model):
    a = models.ForeignKey(A)
    # ....
}}}

Then run '''python manage.py sql''' and you will recieve a comment claiming table app_a_a can not be referenced as it does not exist, yet the output clearly shows the table begin created.

However if one syncs the db, the tables are created and referenced despite the error message. This may be confusing to developers.
"	defect	new	Database layer (models, ORM)	dev	minor				Unreviewed	0	0	0	0		
