mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
Fix stupid previous checkin
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@3988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c36159c6d9
commit
c5a75d2069
@ -231,6 +231,7 @@ 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
|
||||
r_name = '%s_refs_%s_%s_%s' % (r_col, col, 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)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user