diff --git a/frappe/core/doctype/communication/patches/__init__.py b/frappe/core/doctype/communication/patches/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frappe/core/doctype/communication/patches/drop_ref_dt_dn_index.py b/frappe/core/doctype/communication/patches/drop_ref_dt_dn_index.py new file mode 100644 index 0000000000..c1c3fa995b --- /dev/null +++ b/frappe/core/doctype/communication/patches/drop_ref_dt_dn_index.py @@ -0,0 +1,8 @@ +import frappe +from frappe.patches.v14_0.drop_unused_indexes import drop_index_if_exists + + +def execute(): + index_fields = ["reference_doctype", "reference_name"] + index_name = frappe.db.get_index_name(index_fields) + drop_index_if_exists("tabCommunication", index_name) diff --git a/frappe/patches.txt b/frappe/patches.txt index 8113d8db1a..5b076fab59 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -251,3 +251,4 @@ frappe.patches.v16_0.add_module_deprecation_warning frappe.patches.v16_0.auto_generate_desktop_icon_and_sidebar frappe.patches.v16_0.add_private_workspaces_to_sidebar frappe.core.doctype.communication_link.patches.copy_communication_date_to_link +frappe.core.doctype.communication.patches.drop_ref_dt_dn_index