mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[index] [minor] add indexes
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import webnotes
|
||||
|
||||
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`)""")
|
||||
Reference in New Issue
Block a user