[index] [minor] add indexes
This commit is contained in:
parent
27336de68b
commit
154c8579d6
@ -12,4 +12,11 @@ from webnotes.model.bean import copy_doclist
|
|||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self,d,dl):
|
def __init__(self,d,dl):
|
||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
|
|
||||||
|
def on_doctype_update():
|
||||||
|
if not webnotes.conn.sql("""show index from `tabFeed`
|
||||||
|
where Key_name="feed_doctype_docname_index" """):
|
||||||
|
webnotes.conn.commit()
|
||||||
|
webnotes.conn.sql("""alter table `tabFeed`
|
||||||
|
add index feed_doctype_docname_index(doc_type, doc_name)""")
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2012-07-03 13:29:42",
|
"creation": "2012-07-03 13:29:42",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:38:06",
|
"modified": "2013-11-15 10:16:00",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
10
patches/1311/p02_index_singles.py
Normal file
10
patches/1311/p02_index_singles.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
if not webnotes.conn.sql("""show index from `tabSingles`
|
||||||
|
where Key_name="singles_doctype_field_index" """):
|
||||||
|
webnotes.conn.commit()
|
||||||
|
webnotes.conn.sql("""alter table `tabSingles`
|
||||||
|
add index singles_doctype_field_index(`doctype`, `field`)""")
|
@ -241,4 +241,8 @@ patch_list = [
|
|||||||
"execute:webnotes.reload_doc('website', 'doctype', 'table_of_contents') #2013-11-13",
|
"execute:webnotes.reload_doc('website', 'doctype', 'table_of_contents') #2013-11-13",
|
||||||
"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-11-13",
|
"execute:webnotes.reload_doc('website', 'doctype', 'web_page') #2013-11-13",
|
||||||
"execute:webnotes.bean('Style Settings').save() #2013-11-13",
|
"execute:webnotes.bean('Style Settings').save() #2013-11-13",
|
||||||
|
"execute:webnotes.reload_doc('home', 'doctype', 'feed') #2013-11-15",
|
||||||
|
"execute:webnotes.reload_doc('core', 'doctype', 'defaultvalue') #2013-11-15",
|
||||||
|
"execute:webnotes.reload_doc('core', 'doctype', 'comment') #2013-11-15",
|
||||||
|
"patches.1311.p02_index_singles",
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user