Created an article table and added it in settings.py like this:

 INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'article', # моя табличка ] 

Then I enter python manage.py migrate into the terminal and it shows that the command has been executed successfully. But when I open the database, there is simply no article table. Why

And this is despite the fact that if models.py make a mistake in the models.py file, then the python manage.py migrate command will not work, which means that everything is correct, isn't it?

  • did makemigrations ? - Flowneee
  • no, what is it? - faoxis
  • one
    The bottom line is that in order to migrate, you must first create a migration based on the changes made to the models. Accordingly, the makemigrations command makemigrations to create a migration (without arguments, the command will create migrations for all applications), and only then do migrate . documentation - Flowneee
  • Actually, a couple of questions earlier, I already told all this.) - andreymal

0