Merge pull request #6310 from apollo13/informix

Pass type to sql_alter_column*.
This commit is contained in:
Andrew Godwin 2016-03-18 19:47:15 -03:00
commit 2b3a941457
1 changed files with 3 additions and 0 deletions

View File

@ -577,6 +577,7 @@ class BaseDatabaseSchemaEditor(object):
actions.append((
self.sql_alter_column_default % {
"column": self.quote_name(new_field.column),
"type": new_type,
"default": self.prepare_default(new_default),
},
[],
@ -585,6 +586,7 @@ class BaseDatabaseSchemaEditor(object):
actions.append((
self.sql_alter_column_default % {
"column": self.quote_name(new_field.column),
"type": new_type,
"default": "%s",
},
[new_default],
@ -738,6 +740,7 @@ class BaseDatabaseSchemaEditor(object):
"table": self.quote_name(model._meta.db_table),
"changes": self.sql_alter_column_no_default % {
"column": self.quote_name(new_field.column),
"type": new_type,
}
}
self.execute(sql)