[Django]-Django 1.7 – App 'your_app_name' does not have migrations

31👍

I noticed that only those apps that actually contain a migrations folder that contain a file __init__.py are recognized by migrations. IE having only models.py in your app is not enough.

16👍

If you have a single app, running migrate without specifying the app or migration may work.

If so, the first thing to check is that your app name matched that specified in your settings.py under INSTALLED_APPS.

As pointed out in the comments, app names can be in the form [parent_app].[app_name]. In this case, migrate needs [app_name] only.

9👍

Your app must contain a models.py file (even emtpy).

Source: https://groups.google.com/forum/#!msg/django-users/bsTZEmxgDJM/wH0p3xinBWIJ

3👍

Just to mention another possible reason:

In my Django app i added the correct migrations and installed the app with pip and got the same error.

What i was missing is a correct MANIFEST.in file
Also the parameter include_package_data in setup() from the setup.py file was not set to True.

0👍

Please ensure the following:

  1. Confirm that ‘app_name.apps.AppNameConfig’ is added to the list of installed apps.
  2. Double-check the project’s database configuration in the settings.py file.
  3. Make sure that each application includes a directory named migrations, and within that directory, there is a file named __init__.py.

Leave a comment