Fixed a group of missing imports, aliases and parameter passings from the
db.backend.creation refactoring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e42748dbf5
commit
bb5a35cc54
|
@ -260,7 +260,7 @@ class BaseDatabaseCreation(object):
|
|||
output = ['%s %s;' % (style.SQL_KEYWORD('DROP TABLE'),
|
||||
style.SQL_TABLE(qn(model._meta.db_table)))]
|
||||
if model in references_to_delete:
|
||||
output.extend(self.sql_remove_table_constraints(model, references_to_delete))
|
||||
output.extend(self.sql_remove_table_constraints(model, references_to_delete, style))
|
||||
|
||||
if model._meta.has_auto_field:
|
||||
ds = self.connection.ops.drop_sequence_sql(model._meta.db_table)
|
||||
|
@ -268,8 +268,11 @@ class BaseDatabaseCreation(object):
|
|||
output.append(ds)
|
||||
return output
|
||||
|
||||
def sql_remove_table_constraints(self, model, references_to_delete):
|
||||
def sql_remove_table_constraints(self, model, references_to_delete, style):
|
||||
from django.db.backends.util import truncate_name
|
||||
|
||||
output = []
|
||||
qn = self.connection.ops.quote_name
|
||||
for rel_class, f in references_to_delete[model]:
|
||||
table = rel_class._meta.db_table
|
||||
col = f.column
|
||||
|
|
Loading…
Reference in New Issue