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
- Custom SQL via subquery by drg006 4 years, 9 months ago
- Locking tables by miohtama 3 years, 7 months ago
- Creating MySQL Alter table commands for Foreign Keys by vidyanand 3 years, 7 months ago
- Clean up expired django.contrib.session's in a huge MySQL InnoDB table by patsplat 3 years, 1 month ago
- Bulk Insert - updated 5/9/2008 by coolie 4 years, 3 months ago
Comments