### Information about bug
#### Steps to Reproduce :
1. Installed the Helpdesk …app.
2. Later, uninstalled Helpdesk (I no longer need it).
3. Tried to rename a Customer record.
4. The system throws an error and the rename fails.
#### Issue :
After uninstalling Helpdesk, Frappe still tries to update links in the missing tabHD Ticket table during the rename_doc process. This causes a Programming Error, blocking Customer renaming.
### Version
Frappe Framework: v15.69.3 (version-15)
Frappe Helpdesk : Latest Version (Uninstalled on 10/06/2025)
### Installation method
Locally Hosted on Ubuntu
### Relevant log output / Stack trace / Full Error Message.
```shell
Traceback (most recent call last):
File "apps/frappe/frappe/model/document.py", line 1710, in execute_action
getattr(doc, __action)(**kwargs)
File "apps/frappe/frappe/model/document.py", line 1087, in _rename
self.name = rename_doc(doc=self, new=name, merge=merge, force=force, validate=validate_rename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/rename_doc.py", line 183, in rename_doc
update_link_field_values(link_fields, old, new, doctype)
File "apps/frappe/frappe/model/rename_doc.py", line 453, in update_link_field_values
frappe.db.set_value(parent, {docfield: old}, docfield, new, update_modified=False)
File "apps/frappe/frappe/database/database.py", line 990, in set_value
query.run(debug=debug)
File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 230, in sql
self._cursor.execute(query, values)
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table '123456789585.tabHD Ticket' doesn't exist")
```