Django flush vs sqlclear & syncdb

前端 未结 2 2121
长发绾君心
长发绾君心 2021-02-04 03:05

Can anyone tell if there is a difference between

>manage.py flush  # or reset

and

>manage.py sqlclear appname | python m         


        
2条回答
  •  梦如初夏
    2021-02-04 03:10

    Official docs for

    flush and sqlclear

    Flush carries out the SQL Drops on the entire db, sqlflush only prints out the SQL that flush would actual run (again on the entire db). sqlclear prints out SQL Drops for a particular app or apps. Both flush and sqlflush/dbshell/syncdb will install fixtures.

提交回复
热议问题