- October 26, 2009
- Not specified
- sqlite drop oneliner
- 0 (after 0 ratings)
I use this oneliner to delete the matching tables in SQLite. Use carefully!
echo ".tables" | python manage.py dbshell | tr " " "\n" | grep myapp | sed 's/^/DROP TABLE /g' | sed 's/$/;/g' | python manage.py dbshell