Skip to content

Instantly share code, notes, and snippets.

@citmusa
Last active January 12, 2017 08:41
Show Gist options
  • Save citmusa/d1758486dfa08f4244a0 to your computer and use it in GitHub Desktop.
Save citmusa/d1758486dfa08f4244a0 to your computer and use it in GitHub Desktop.
delete heroku - postgress table
python manage.py shell:
>>> sql = '''drop table mytable cascade;
... drop table mytable2; '''
>>>
>>> from django.db import connections, transaction
>>> cursor = connections['default'].cursor()
>>> cursor.execute(sql)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment