Forums

Table does not exist MySQL Django app

Hello, I would like to know why I get a error saying that the table does not exist after running "python manage.py migrate". This is the second app that I'm intalling, the previous one had no issues and all the migrations were made creating all the required table for the app to run automatically. Do I need to create all the tables and fields manually? Should I delete the files with migrations created while developing the app locally? Thank you

Did you run makemigrations management command?

Both give me the same error output

Are you getting the error on PythonAnywhere or locally? Are your models and migrations the same in both environments?

Yes, I'm getting the error in pythonanywhere, and my models and migrations are the same in both.

What is the exact error you are getting when you try to migrate?

The error said that a specific table does not exist. I managed to make the migrations by commenting all my models and making the migrations, then add them back and migrate again. It works now, all tables were created but, I don't know what was causing the error.

Now, as other users pointed out I'm not able to see my files, in the web tab says that my virtual enviroments and my files doesn't exist but, my sites are still working.

Your migrations and/or database must have been in some messy state, It's hard to tell without looking directly on the state of your code and the database. Sometimes if your don't have any data that you care about it's better to create a fresh database.