summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-08-09 11:22:14 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-08-09 11:22:14 +0000
commit7a22a5194ccf81cc94ad03daf7f399f0b307430f (patch)
treead22be8ff4f9da72f5f0d99a17b5d7b3ef39a374 /django
parent5ca28474f9e554170fd96a2b2ddd4fa1305807ce (diff)
Fixed #2469 -- Made the "drop index" constraint names match those we create in the first place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/core/management.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 4cf7bcea3d..5bb9f98a19 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -301,7 +301,7 @@ def get_sql_delete(app):
(style.SQL_KEYWORD('ALTER TABLE'),
style.SQL_TABLE(backend.quote_name(table)),
style.SQL_KEYWORD(backend.get_drop_foreignkey_sql()),
- style.SQL_FIELD(backend.quote_name("%s_referencing_%s_%s" % (col, r_table, r_col)))))
+ style.SQL_FIELD(backend.quote_name('%s_refs_%s_%x' % (r_col, col, abs(hash((table, r_table))))))))
del references_to_delete[model]
# Output DROP TABLE statements for many-to-many tables.