diff options
| author | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2006-11-04 21:18:20 +0000 |
|---|---|---|
| committer | Boulder Sprinters <boulder-sprinters@djangoproject.com> | 2006-11-04 21:18:20 +0000 |
| commit | 2141ee605fd1269ab187764c8dc53eabd8eea2f5 (patch) | |
| tree | b98b73524897310ecdfc4bdf41fc04e8d8b28c8e | |
| parent | 83f930332b7300486464e22dde0e698014f1c89c (diff) | |
MySQL mangling is redundant now with truncate_name
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@3985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/django/core/management.py b/django/core/management.py index 0b3866e818..39574b5dca 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -227,9 +227,6 @@ def _get_sql_for_pending_references(model, pending_references): r_col = f.column table = opts.db_table col = opts.get_field(f.rel.field_name).column - # For MySQL, r_name must be unique in the first 64 characters. - # So we are careful with character usage here. - r_name = '%s_refs_%s_%x' % (r_col, col, abs(hash((r_table, table)))) final_output.append(style.SQL_KEYWORD('ALTER TABLE') + ' %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s);' % \ (backend.quote_name(r_table), truncate_name(r_name, backend.get_max_name_length()), backend.quote_name(r_col), backend.quote_name(table), backend.quote_name(col))) |
