Как мне избавиться от этой ошибки, «Неизвестный столбец ‘history_change_reason'»?

#python #django #django-simple-history

#python #django #django-simple-history

Вопрос:

Привет сообществу stackoverflow,

Я сталкиваюсь с этой ошибкой при попытке записи в свою базу данных. Кажется, я не могу найти столбец history_change_reason в своей базе данных через MySQLWorkbench. Кто-нибудь еще сталкивался с этим раньше?

   File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/models/base.py", line 822, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/models/base.py", line 861, in _do_insert
    using=using, raw=raw)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/models/query.py", line 920, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 963, in execute_sql
    cursor.execute(sql, params)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/utils.py", line 97, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/MySQLdb/cursors.py", line 209, in execute
    res = self._query(query)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/MySQLdb/cursors.py", line 315, in _query
    db.query(q)
  File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/MySQLdb/connections.py", line 239, in query
    _mysql.connection.query(self, query)
OperationalError: (1054, "Unknown column 'history_change_reason' in 'field list'")
  

Комментарии:

1. Вы запускали manage.py migrate ?

2. Я сделал, да @AlexVyushkov