Django : Table doesn't exist

前端 未结 8 1699
再見小時候
再見小時候 2020-11-28 07:45

I dropped some table related to an app. and again tried the syncdb command

python manage.py syncdb

It shows error like

dja         


        
8条回答
  •  無奈伤痛
    2020-11-28 08:17

    What solved my problem in situation when manage.py setmigration and then migrate to the SQL database is not working properly did is following:

    1. Run command : python manage.py migrate --fake MyApp zero
    2. After that: python manage.py migrate MyApp

    And the problem that rises with connections.py and and after running correctly the migration command is solved! At least for me.

    I'm using Python (3.x), MySQL DB, Django (3.x), and I was in situation when I needed after some time of successfully creating tables in my database, that some error regarding connections.py raises. But, above commands helped. I hope they will help all those who are having these type of problems.

提交回复
热议问题