Django: You have .. unapplied migration(s).


I am learning Python web development. After installing Django and starting the server by running the comment python runserver in the integrated terminal. I got a message in red letters about unapplied migration(s) and the project may not work properly because of this.

$ python runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python migrate' to apply them.

July 18, 2019 - 04:47:07
Django version 2.2.3, using settings 'web_project.settings'
Starting development server at 
Quit the server with CONTROL-C.

To fix this issue, I tried running the comment python migrate in the same integrated terminal. But nothing happened. Then I realized that I have to stop the Django server before running the migration comment.

You have .. unapplied migration(s)

Solution for unapplied migration(s)

To run the migrate comment:

  1. First, stop the Django server by pressing the keys CONTROL-C.
  2. Then run the comment python migrate in the same integrated terminal or a new one. Now you can see all the required migrations applied to the apps.
Running Django migration comment

Tools & Technologies Involved

  • Python (3.7.3)
  • Django (2.2.3)
  • Visual Studio Code (1.36.0)
  • macOS Mojave (10.14.5)


Related Articles & Tools

Leave your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.