1 2 3 4 5 | echo 'show tables;' \
| python manage.py dbshell \
| sed -n 2,\$p \
| awk 'BEGIN {print "set foreign_key_checks=0;"} { print "drop table `" $1 "`;"}' \
| python manage.py dbshell
|
More like this
- Creating MySQL Alter table commands for Foreign Keys by vidyanand 4 years, 11 months ago
- Custom SQL via subquery by drg006 6 years ago
- Table Creation Using ORM Standalone by EliAndrewC 5 years, 3 months ago
- Managing Google AppEngine datastore maintenance by cvedovini 2 years, 10 months ago
- Bulk Insert - updated 5/9/2008 by coolie 5 years, 7 months ago
Comments