def on_doctype_update():
 frappe.db.add_index(u'DocShare', [u'user', u'share_doctype'])
 frappe.db.add_index(u'DocShare', [u'share_doctype', u'share_name'])

def on_doctype_update ( ) : frappe . db . add_index ( u'DocShare' , [ u'user' , u'share_doctype' ] ) frappe . db . add_index ( u'DocShare' , [ u'share_doctype' , u'share_name' ] )
add index in tabcommunication for .