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 4 years, 4 months ago
  2. SQLite database vacuum script by pbx 6 years, 11 months ago
  3. fast table flush without raw SQL by dsblank 4 years, 4 months ago
  4. Prefetch id for Postgresql backend by bretth 2 years ago
  5. Searching and Deleting Cache Entries in Admin tool by shootclub 2 years, 9 months ago

Comments

(Forgotten your password?)