Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions django_heroku/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,8 @@ def setup_databases(self, **kwargs):

def _wipe_tables(self, connection):
with connection.cursor() as cursor:
cursor.execute(
"""
DROP TABLE (
SELECT
table_name
FROM
information_schema.tables
WHERE
table_schema = 'public'
) CASCADE;
"""
)
for table_name in connection.introspection.table_names():
cursor.execute(f"DROP TABLE IF EXISTS {table_name} CASCADE")

def teardown_databases(self, old_config, **kwargs):
self.keepdb = True
Expand Down