2013-11-20 12:59:58 +05:30
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-11-15 16:09:45 +05:30
|
|
|
# License: GNU General Public License v3. See license.txt
|
2013-11-16 12:33:34 +05:30
|
|
|
from __future__ import unicode_literals
|
2013-11-15 16:09:45 +05:30
|
|
|
|
|
|
|
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`)""")
|