South migration error: NoMigrations exception for django.contrib.auth South migration error: NoMigrations exception for django.contrib.auth django django

South migration error: NoMigrations exception for django.contrib.auth


Leaving this here for future googlers

I recently ran into this exceptions with one of my own apps today, not a contrib one.

After a bit of head-scratching I noticed that somehow the file ...

 app/migrations/__init__.py

... had been deleted, which means python cant import the dir as a module etc etc.


I solved the problem.

Obviously, you can't use South to do the migrations for the apps that are part of Django, like 'auth' so I didn't know why it was trying to.

I realised that for a while I had another app within my project called auth. I must have tried to migrate this at some point before renaming it and therefore messed it all up.

I removed the migration history entries from the database for that app and everything was fine.


I just ran into this after swithcing branches and app versions, and decided to remove the app that now had no migrations from the south_migrationhistory table

./manage.py dbshellmysql> SELECT * FROM south_migrationhistory WHERE app_name = 'social_auth';104 | social_auth | 0001_initial...                                                                   105 | social_auth | 0002_auto__add_unique_nonce...mysql> DELETE FROM south_migrationhistory WHERE app_name = 'social_auth';Query OK, 2 rows affected (0.00 sec)