Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python manage.py shell -c "from django.db import connection; c = connection.cursor();c.execute(`show tables;`);parts = ('DROP TABLE IF EXISTS %s;' % table for (table,) in cursor.fetchall());sql = 'SET FOREIGN_KEY_CHECKS = 0;\n' + '\n'.join(parts) + 'SET FOREIGN_KEY_CHECKS = 1;\n'; c.cursor().execute(sql)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement