code: def rename_column(self, model, old_name, new_name):
          
          field = model._meta.fields[old_name]
          if isinstance(field, pw.ForeignKeyField):
              old_name = field.column_name
          self.__del_field__(model, field)
          field.name = field.column_name = new_name
          model._meta.add_field(new_name, field)
          if isinstance(field, pw.ForeignKeyField):
              field.column_name = new_name = field.column_name + '_id'
          self.ops.append(self.migrator.rename_column(model._meta.table_name, old_name, new_name))
          return model
docs: Rename field in model.