How to drop all tables from the database with manage.py CLI in Django?

前端 未结 18 1671
余生分开走
余生分开走 2020-11-29 16:54

How can I drop all tables from a database using manage.py and command line? Is there any way to do that executing manage.py with appropriate parameters so I can execute it f

18条回答
  •  遥遥无期
    2020-11-29 17:42

    It is better to use ./manage.py sqlflush | ./manage.py dbshell because sqlclear requires app to flush.

提交回复
热议问题