Merge pull request #9214 from saurabh6790/stock_ledger_entry_indexing

[fix] add index on voucher type and voucher no in stock ledger entry
This commit is contained in:
Makarand Bauskar 2017-06-12 17:26:24 +05:30 committed by GitHub
commit 88a0d22c10
2 changed files with 3 additions and 1 deletions

View File

@ -694,7 +694,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-12-15 14:45:07.733480",
"modified": "2017-06-09 14:45:07.888888",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Ledger Entry",

View File

@ -129,3 +129,5 @@ def on_doctype_update():
frappe.db.commit()
frappe.db.sql("""alter table `tabStock Ledger Entry`
add index posting_sort_index(posting_date, posting_time, name)""")
frappe.db.add_index("Stock Ledger Entry", ["voucher_no", "voucher_type"])