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
11 changes: 3 additions & 8 deletions django_heroku/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ 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;
SELECT format('DROP TABLE IF EXISTS %s;',
(SELECT string_agg(table_name, ',')
FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'public'));
"""
)

Expand Down