2013-11-15 10:39:45 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
2013-11-16 07:03:34 +00:00
|
|
|
from __future__ import unicode_literals
|
2013-11-15 10:39:45 +00:00
|
|
|
|
|
|
|
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`)""")
|