blob: a94968042f28666adbf5f3c78b916acce27bc747 [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
Anand Doshi2b713802013-11-16 12:33:34 +05303from __future__ import unicode_literals
Rushabh Mehta154c8572013-11-15 16:09:45 +05304
5def execute():
6 import webnotes
7 if not webnotes.conn.sql("""show index from `tabSingles`
8 where Key_name="singles_doctype_field_index" """):
9 webnotes.conn.commit()
10 webnotes.conn.sql("""alter table `tabSingles`
11 add index singles_doctype_field_index(`doctype`, `field`)""")