Hi! A little noisy issue following me with every opening page “deploy-candidate-build”: pymysql.err.OperationalError: (1054, "Unknown column ‘tabDeploy.build’ in ‘WHERE’")
I tried to install frappe with develop (16.X branch) and version-15 branch, nothing matter. Tried to do:
- bench migrate
- bench update --reset
I see, that table “deploy” don’t have column “build”, but don’t understand how to fix it, and does it need to be fixed?
Error text:
App Versions
{
"frappe": "15.69.3",
"press": "0.7.0"
}
Route
Form/Deploy Candidate Build/dgdfo152mb
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 115, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 51, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 84, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1742, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/__init__.py", line 888, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File "apps/frappe/frappe/desk/notifications.py", line 289, in get_open_count
external_links_data_for_d = get_external_links(d, name, links)
File "apps/frappe/frappe/desk/notifications.py", line 336, in get_external_links
total_count = get_doc_count(doctype, filters)
File "apps/frappe/frappe/desk/notifications.py", line 348, in get_doc_count
frappe.get_all(
File "apps/frappe/frappe/__init__.py", line 2034, in get_all
return get_list(doctype, *args, **kwargs)
File "apps/frappe/frappe/__init__.py", line 2009, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File "apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
File "apps/frappe/frappe/model/db_query.py", line 232, in build_and_run
return frappe.db.sql(
File "apps/frappe/frappe/database/database.py", line 230, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.10/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'tabDeploy.build' in 'WHERE'")
Request Data
{
"type": "GET",
"args": {
"doctype": "Deploy Candidate Build",
"name": "dgdfo152mb",
"items": "[\"Agent Job\",\"Error Log\",\"Press Notification\",\"Deploy\",\"Bench\"]"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.notifications.get_open_count",
"request_id": null
}
Response Data
{
"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'tabDeploy.build' in 'WHERE'\")",
"exc_type": "OperationalError"
}
Output of describe database table:
frappe@press:~/frappe-bench$ bench describe-database-table --doctype “Deploy”
{
“table_name”: “tabDeploy”,
“total_rows”: 0,
“schema”: [
{
“column”: “name”,
“type”: “varchar(140)”,
“is_nullable”: false,
“default”: null,
“cardinality”: 0
},
{
“column”: “creation”,
“type”: “datetime(6)”,
“is_nullable”: true,
“default”: null
},
{
“column”: “modified”,
“type”: “datetime(6)”,
“is_nullable”: true,
“default”: null,
“cardinality”: 0
},
{
“column”: “modified_by”,
“type”: “varchar(140)”,
“is_nullable”: true,
“default”: null
},
{
“column”: “owner”,
“type”: “varchar(140)”,
“is_nullable”: true,
“default”: null
},
{
“column”: “docstatus”,
“type”: “int(1)”,
“is_nullable”: false,
“default”: “0”
},
{
“column”: “idx”,
“type”: “int(8)”,
“is_nullable”: false,
“default”: “0”
},
{
“column”: “group”,
“type”: “varchar(140)”,
“is_nullable”: true,
“default”: null
},
{
“column”: “team”,
“type”: “varchar(140)”,
“is_nullable”: true,
“default”: null
},
{
“column”: “staging”,
“type”: “int(1)”,
“is_nullable”: false,
“default”: “0”
},
{
“column”: “candidate”,
“type”: “varchar(140)”,
“is_nullable”: true,
“default”: null,
“cardinality”: 0
},
{
“column”: “_user_tags”,
“type”: “text”,
“is_nullable”: true,
“default”: null
},
{
“column”: “_comments”,
“type”: “text”,
“is_nullable”: true,
“default”: null
},
{
“column”: “_assign”,
“type”: “text”,
“is_nullable”: true,
“default”: null
},
{
“column”: “_liked_by”,
“type”: “text”,
“is_nullable”: true,
“default”: null
}
],
“indexes”: [
{
“unique”: true,
“cardinality”: 0,
“name”: “PRIMARY”,
“sequence”: 1,
“nullable”: false,
“column”: “name”,
“type”: “BTREE”
},
{
“unique”: false,
“cardinality”: 0,
“name”: “candidate”,
“sequence”: 1,
“nullable”: true,
“column”: “candidate”,
“type”: “BTREE”
},
{
“unique”: false,
“cardinality”: 0,
“name”: “modified”,
“sequence”: 1,
“nullable”: true,
“column”: “modified”,
“type”: “BTREE”
}
]
}