blob: 94fb197d0dd5a46622a4223f4674539aa397ae24 [file] [log] [blame]
Rushabh Mehta154c8572013-11-15 16:09:45 +05301# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
2# License: GNU General Public License v3. See license.txt
3
4def execute():
5 import webnotes
6 if not webnotes.conn.sql("""show index from `tabSingles`
7 where Key_name="singles_doctype_field_index" """):
8 webnotes.conn.commit()
9 webnotes.conn.sql("""alter table `tabSingles`
10 add index singles_doctype_field_index(`doctype`, `field`)""")