Should i edit the django migration file to edit mismatched dependencies
<p>I have landed into quite a unique problem. I created the model <strong>1.</strong>'message', used it for a while, then i changed it to <strong>2.</strong> 'messages' and after that again changed it back to <strong>3.</strong> 'message' but this time with many changes in the model fields.</p>

<p>As i got to know afterwards, django migrations gets into some problems while renaming models. In my migrations, some problems have arose. Although I had run all migrations in the right way, while running the 3rd migration for message, i faced few problems that i fixed manually. Now when i ran migration for changes in other models, i found that this migration is still dependent on the 2nd migration of the messages. However, the fields for which it was dependent on the 2nd migration were actually created in third migration.</p>

<p>The traceback i am getting:</p>

<pre><code>ValueError: Lookup failed for model referenced by field activities.Enquiry.message_fk: chat.Message
</code></pre>

<p>and:</p>

<pre><code>  Applying contacts.0002_mailsend...Traceback (most recent call last):
  File "/home/sp/webapps/myenv/lib/python3.4/site-packages/django/apps/config.py", line 163, in get_model
    return self.models[model_name.lower()]
KeyError: 'message'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sp/webapps/myenv/lib/python3.4/site-packages/django/db/migrations/state.py", line 84, in render
    model = self.apps.get_model(lookup_model[0], lookup_model[1])
  File "/home/sp/webapps/myenv/lib/python3.4/site-packages/django/apps/registry.py", line 202, in get_model
    return self.get_app_config(app_label).get_model(model_name.lower())
  File "/home/sp/webapps/myenv/lib/python3.4/site-packages/django/apps/config.py", line 166, in get_model
    "App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'chat' doesn't have a 'message' model.
</code></pre>

<p>What i want to ask is whether I should manually edit the dependencies in the migration file to change it from migration 2 to migration 3 in messages.</p>

<p>PS: using django 1.7.2</p>