I've upgraded to the 1.7 release version, and I'm still having this issue. 
While I can (and for my testing purposes have) manually change the database 
structure and update the foreign keys to point to the correct row in the 
new table, that kind of defeats the purpose of migrations. I understand 
that I probably should have used a Data Migration instead of simply letting 
the default engine generate the migration, but I've already changed the 
database structure. How can I do migrations in future if I can't get the 
current one applied? Please help.

On Wednesday, July 23, 2014 12:49:29 PM UTC-5, Shawn H wrote:
>
> May be issue #22944
>
> On Tuesday, July 22, 2014 10:29:03 AM UTC-5, Shawn H wrote:
>>
>> Forgot to mention that I'm running 1.7RC1
>>
>> On Tuesday, July 22, 2014 10:27:11 AM UTC-5, Shawn H wrote:
>>>
>>> I've looked at  Issue 22485 
>>> <https://code.djangoproject.com/ticket/22485> and Issue 22563 
>>> <https://code.djangoproject.com/ticket/22563>, and I'm unsure if my 
>>> issue is different. I've an employees app with an employee model. I've a 
>>> tracking app that originally had 3 models each with a foreign key to 
>>> auth_user. I made a migration for the tracking app to switch those 3 models 
>>> foreign key to the employees.Employee model. When I try to apply the 
>>> migration, I get
>>>
>>>   File 
>>> "C:\Virtual\Django17c1\lib\site-packages\django\db\migrations\state.py", 
>>> line 89, in render
>>>     model=lookup_model,
>>> ValueError: Lookup failed for model referenced by field 
>>> tracking.PropertyDescription.verified_by: employees.Employee
>>>
>>> Stepping through the code, it's failing on line 79 when it's trying to 
>>> find the employees app. The employees app is not in self.apps for some 
>>> reason I've not been able to figure out, especially since the employees app 
>>> is in the global apps.app_configs in migrate.py line 160. The employees app 
>>> has been migrated.
>>>
>>> How should I proceed? Thanks.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e3000d9f-0bbf-45d8-9415-036c7b66c74c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to