No migrations to apply

14,389

Solution 1

As the command line output says the problem is that you changed the models. The solution is to run python manage.py makemigrations and then python manage.py migrate.

Solution 2

The Best Thing You can do is, Delete the existing database. In my case, I were using phpMyAdmin SQL database, so I manually delete the created database overthere. Again run the following Commands:

python manage.py makemigrations

python manage.py migrate

python manage.py makemigrations <app_name>

python manage.py migrate

Solution 3

IT COULD BE BECAUSE YOU HAVE NOT YET REGISTERED YOUR APP IN SETTINGS.PY inside this file install your app (put the name of your app in quotes) after you can make python3 manage.py makemigrations and then python3 manage.py migrate (it can be python3 or python without the 3 ):

INSTALLED_APPS = [
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'new_app_name',
] 
Share:
14,389

Related videos on Youtube

Alwerdani
Author by

Alwerdani

Updated on June 04, 2022

Comments

  • Alwerdani
    Alwerdani about 2 years
    $python manage.py syncdb
    Operations to perform:
      Apply all migrations: admin, contenttypes, auth, sessions
    Running migrations:
      No migrations to apply.
      Your models have changes that are not yet reflected in a migration, and so won't be applied.
      Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
    

    the error printscreen

    enter image description here

    i don't know what the problem !

    • Norman8054
      Norman8054 almost 10 years
      What is your question? Does manage.py makemigrations work?
    • Alwerdani
      Alwerdani almost 10 years
      i try to syncdb this is the error that appear i don't know what the problem !