oneliner to delete SQLite tables

1
echo ".tables" | python manage.py dbshell | tr " " "\n" | grep myapp | sed 's/^/DROP TABLE /g' | sed 's/$/;/g' | python manage.py dbshell

More like this

  1. grep and delete sqlite tables by kifkif 2 years, 2 months ago
  2. fast table flush without raw SQL by dsblank 2 years, 1 month ago
  3. SQLite database vacuum script by pbx 4 years, 9 months ago
  4. by ago
  5. by ago

Comments

kifkif (on December 7, 2009):

Improved version here

#

(Forgotten your password?)