Django migration error: has no field named u'DO_NOTHING'
Look django_migrations table in db. Find last migrated migrations file there
and compare this file with next migrations file.
You can also add last migrations file in there with manually if everything okay in your database.
I've been trying to add a foreign key to my models in Django 1.9 with the option on_delete='DO_NOTHING' per instructions on Django Docs, but for version 1.10. I ran python manage.py makemigrations without any problems but when I tried to run python manage.py migrate of course I got the error:
django.core.exceptions.FieldDoesNotExist: Entrance has no field named u'DO_NOTHING'
Realizing my mistake, I changed the option to on_delete=models.DO_NOTHING and ran makemigrations and migrate again but I'm still getting the same error:
django.core.exceptions.FieldDoesNotExist: Entrance has no field named u'DO_NOTHING'
Looks like something is wrong in migration files. Not too familiar with internal workings of Django so I don't know where to look to fix this. Any ideas?