2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-08-05 09:29:54 +00:00
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2012-10-01 06:05:49 +00:00
|
|
|
from __future__ import unicode_literals
|
2012-09-19 06:31:01 +00:00
|
|
|
import webnotes
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
webnotes.conn.commit()
|
|
|
|
try:
|
2012-09-19 06:53:35 +00:00
|
|
|
webnotes.conn.sql("""alter table `tabStock Ledger Entry` add index posting_sort_index(posting_date, posting_time, name)""")
|
|
|
|
webnotes.conn.commit()
|
2012-09-19 06:31:01 +00:00
|
|
|
except Exception, e:
|
2013-11-12 11:58:17 +00:00
|
|
|
if e.args[0]!=1061: raise
|
2012-09-19 06:31:01 +00:00
|
|
|
webnotes.conn.begin()
|
|
|
|
|