From 021b38a52c1e0e8e995fd6d2cc117e88bb636d26 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 10 Feb 2006 05:12:43 +0000 Subject: [PATCH] magic-removal: Fixed #1082 -- Fixed bug in sqlreset and reset with SQLite. Thanks, Christopher Lenz git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2296 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/core/management.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index e9316b700d..44cee256a7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -66,6 +66,7 @@ answer newbie questions, and generally made Django that much better: lakin.wecker@gmail.com Stuart Langridge Eugene Lazutkin + Christopher Lenz limodou Martin Maney Maniac diff --git a/django/core/management.py b/django/core/management.py index 7b498b2546..88c4c3c251 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -224,7 +224,7 @@ def get_sql_delete(app): connection.rollback() else: output.append("DROP TABLE %s;" % backend.quote_name(klass._meta.db_table)) - if references_to_delete.has_key(klass): + if backend.supports_constraints and references_to_delete.has_key(klass): for rel_class, f in references_to_delete[klass]: table = rel_class._meta.db_table col = f.column