'Alters the given column name so it will match the given field.
Note that conversion between the two by the database must be possible.
Will not automatically add _id by default; to have this behavour, pass
explicit_name=False.
@param table_name: The name of the table to add the column to
@param name: The name of the column to alter
@param field: The new field definition to use'

@generic.invalidate_table_constraints
def alter_column(self, table_name, name, field, explicit_name=True, ignore_constraints=False):

    if self.dry_run:
        if self.debug:
            print('            -    no    dry    run    output    for    alter_column()    due    to    dynamic    DDL,    sorry')
        return
    if hasattr(field, 'south_init'):
        field.south_init()
    field.set_attributes_from_name(name)
    if (not explicit_name):
        name = field.column
    else:
        field.column = name
    if (not ignore_constraints):
        self._drop_constraints(table_name, name, field)
    params = {'column': self.quote_name(name), 'type': self._db_type_for_alter_column(field), 'table_name': table_name}
    sqls = []
    sqls_extra = []
    if (params['type'] is not None):
        sqls.append(((self.alter_string_set_type % params), []))
    self._alter_add_column_mods(field, name, params, sqls)
    sqls_extra.append(self._alter_column_set_null(table_name, name, field.null))
    self._alter_set_defaults(field, name, params, sqls)
    if self.allows_combined_alters:
        (sqls, values) = list(zip(*sqls))
        self.execute(('ALTER    TABLE    %s    %s;' % (self.quote_name(table_name), ',    '.join(sqls))), generic.flatten(values))
    else:
        for (sql, values) in sqls:
            try:
                self.execute(('ALTER    TABLE    %s    %s;' % (self.quote_name(table_name), sql)), values)
            except DatabaseError as e:
                print(e)
    for sql in sqls_extra:
        self.execute(sql)
    if (not ignore_constraints):
        if (field.rel and self.supports_foreign_keys):
            self.execute(self.foreign_key_sql(table_name, field.column, field.rel.to._meta.db_table, field.rel.to._meta.get_field(field.rel.field_name).column))
