﻿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
25698	App without migrations depending on app with migrations fails on initial migrate call (postgres)	Lucas Moeskops	nobody	"Simple test example:
In a new project add 'django.contrib.sites' and your main app to the `INSTALLED APPS` setting.
Use postgres as database.
Make a model in your main app that uses a relation to django.contrib.sites:


{{{
from django.contrib.sites.models import Site
class MyModel(models.Model):
  my_site = models.ForeignKey(Site)

}}}

Migrate the project:


{{{
python manage.py migrate
}}}


It will fail to migrate with the message: `django.db.utils.ProgrammingError: relation ""django_site"" does not exist`. This is because it tries to migrate the apps without migrations before the apps with migrations. 

To solve the problem, the app should have at least one migration with a dependency to django.contrib.sites. But maybe this needs to be documented. I couldn't find it in the documentation."	Uncategorized	new	Migrations	1.8	Normal		migrate postgres		Unreviewed	0	0	0	0	1	0
