Ticket #12976: patch.txt

File patch.txt, 829 bytes (added by pczapla, 5 years ago)

I've attached a quick solution that fixed the problem for me.

Line 
1### Eclipse Workspace Patch 1.0
2Index: libs/django-trunk/django/core/management/sql.py
3===================================================================
4--- libs/django-trunk/django/core/management/sql.py     (revision 12454)
5+++ libs/django-trunk/django/core/management/sql.py     (working copy)
6@@ -119,7 +119,9 @@
7         tables = connection.introspection.django_table_names(only_existing=True)
8     else:
9         tables = connection.introspection.table_names()
10-    statements = connection.ops.sql_flush(style, tables, connection.introspection.sequence_list())
11+    sequences = [s for s in connection.introspection.sequence_list()
12+                    if s['table'] in tables]
13+    statements = connection.ops.sql_flush(style, tables, sequences)
14     return statements
15 
16 def sql_custom(app, style, connection):
Back to Top