2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-11-15 10:39:45 +00:00
|
|
|
# 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`)""")
|