Try ERPNext Buy Support Partners Foundation

Getting This error while creating patients. pymysql.err.InternalError: (1054, "Unknown column 'tabSales Invoice.patient' in 'where clause'")

NOTE: Patient is being created. But getting this error when patient is created

Getting the server error as : pymysql.err.InternalError: (1054, “Unknown column ‘tabSales Invoice.patient’ in ‘where clause’”)

{
“erpnext”: “12.9.4”,
“frappe”: “12.6.1”
}
Route
Form/Patient/Keshav
Error Report
Traceback (most recent call last):
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.api.handle()
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/api.py”, line 56, in handle
return frappe.handler.handle()
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/init.py”, line 1055, in call
return fn(*args, **newargs)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/init.py”, line 527, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 248, in get_open_count
total = len(frappe.get_all(d, fields=“name”,
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/init.py”, line 1318, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/init.py”, line 1291, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 96, in execute
result = self.build_and_run()
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 130, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/clear_sky/frappe-bench/apps/frappe/frappe/database/database.py”, line 171, in sql
self._cursor.execute(query)
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/clear_sky/frappe-bench/env/lib/python3.8/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, “Unknown column ‘tabSales Invoice.patient’ in ‘where clause’”)