From a694de1876d86bbc8e4ae20cacee3f026b820eee Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 13 Feb 2016 16:42:04 +0530 Subject: [PATCH] [optimization] added timeline_doctype, timeline_name index in communication --- frappe/core/doctype/communication/communication.json | 2 +- frappe/core/doctype/communication/communication.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/core/doctype/communication/communication.json b/frappe/core/doctype/communication/communication.json index 8cd2c7c00f..4fab1d0e52 100644 --- a/frappe/core/doctype/communication/communication.json +++ b/frappe/core/doctype/communication/communication.json @@ -900,7 +900,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-02-02 06:39:17.516884", + "modified": "2016-02-13 06:39:17.516884", "modified_by": "Administrator", "module": "Core", "name": "Communication", diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 35ab4d5a0c..9c676ecb76 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -164,6 +164,7 @@ class Communication(Document): def on_doctype_update(): """Add index in `tabCommunication` for `(reference_doctype, reference_name)`""" frappe.db.add_index("Communication", ["reference_doctype", "reference_name"]) + frappe.db.add_index("Communication", ["timeline_doctype", "timeline_name"]) def has_permission(doc, ptype, user): if ptype=="read" and doc.reference_doctype and doc.reference_name: