ProgrammingError at /blog/ (1146, "Table 'mahsamoh_artemisia.blog_post' doesn't exist")


hello how are you? I’ve got a problem with my project that is my “mysql” settings:

I’m sure about passwords and name but this is my setting too

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mahsamoh_artemisia',
        'USER': 'mahsamoh_parsa',
        'PASSWORD': 'MpM1188neverfindit',
        'HOST': 'localhost',
        'PORT': '3306',
    }
}

Have you run your makemigrations and migrate on your project?

Does showmigrations show that your migrations for your app have been applied?

1 Like

yes I’ve done everything


that’s the picture but the error is there

I do not see “blog” listed as an app in the “apply all migrations” line.

Do you have a “migrations” directory in your “blog” app? If not, then you need to specify the app name in your makemigrations command.

See the docs for makemigrations

1 Like

yes that was the problem :heart: thank you, I cheated :sunglasses: I wrote a folder name migrations and an init.py in that folder. I wanted to say special thank you to you because of fast answering :heart: :heart: :heart: