Advertisement
Guest User

Untitled

a guest
May 27th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. 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