Rushabh Mehta | 154c857 | 2013-11-15 16:09:45 +0530 | [diff] [blame] | 1 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. |
2 | # License: GNU General Public License v3. See license.txt | ||||
3 | |||||
4 | def 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`)""") |