你好 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'")