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

前端 未结 18 1733
余生分开走
余生分开走 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:41

    There's an even simpler answer if you want to delete ALL your tables. You just go to your folder containing the database (which may be called mydatabase.db) and right-click the .db file and push "delete." Old fashioned way, sure-fire to work.

提交回复
热议问题