0

I want to get all apps sql clear code in Django. I can use ./manage.py sqlclear but I need to specify an appname, so is just for one app.

Is there a way or command to execute sqlclear over all installed apps ?

levi
  • 22,001
  • 7
  • 73
  • 74

2 Answers2

1

Django extensions has reset_db command which is handy.

Sample run:

(junction)➜  junction git:(master) ✗ ./manage.py reset_db
Monkey patching...

You have requested a database reset.
This will IRREVERSIBLY DESTROY
ALL data in the database "/Users/kracekumar/code/junction/db.sqlite3".
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Reset successful.
Kracekumar
  • 19,457
  • 10
  • 47
  • 56
0

You can use sqlflush for printing out database flushing command or directly use flush for removing all data from database.

ruddra
  • 50,746
  • 7
  • 78
  • 101