brotherton-erpnext/erpnext/patches/september_2012/add_stock_ledger_entry_index.py
2012-09-19 12:01:01 +05:30

10 lines
286 B
Python

import webnotes
def execute():
webnotes.conn.commit()
try:
webnotes.conn.sql("""alter table `tabStock Ledger Entry` add index posting_sort_index(posting_date, posting_time, name)""")webnotes.conn.commit()
except Exception, e:
if e.args[0]!=1061: raise e
webnotes.conn.begin()