

def remove_field(self, field_name):
    if (field_name not in self.fields):
        return
    original = self.fields.pop(field_name)
    del self.columns[original.db_column]
    self._sorted_field_list.remove(original)
    self.sorted_fields = list(self._sorted_field_list)
    self.sorted_field_names = [f.name for f in self.sorted_fields]
    if (original.default is not None):
        del self.defaults[original]
        if self._default_callables.pop(original, None):
            for (i, (name, _)) in enumerate(self._default_callable_list):
                if (name == field_name):
                    self._default_callable_list.pop(i)
                    break
        else:
            self._default_dict.pop(original, None)
            self._default_by_name.pop(original.name, None)

dataset/ETHPy150Open coleifer/peewee/peewee.py ModelOptions.remove_field/original