fix: drop index batch_no_item_code_warehouse_index

(cherry picked from commit 28180ccaa4)
This commit is contained in:
Rohit Waghchaure
2025-09-18 13:08:26 +05:30
committed by Mergify
parent 5ef7a7857c
commit df42348d39
3 changed files with 2 additions and 3 deletions

View File

@@ -408,7 +408,7 @@ erpnext.patches.v14_0.set_update_price_list_based_on
erpnext.patches.v15_0.set_cancelled_status_to_cancelled_pos_invoice erpnext.patches.v15_0.set_cancelled_status_to_cancelled_pos_invoice
erpnext.patches.v15_0.rename_group_by_to_categorize_by_in_custom_reports erpnext.patches.v15_0.rename_group_by_to_categorize_by_in_custom_reports
erpnext.patches.v14_0.update_full_name_in_contract erpnext.patches.v14_0.update_full_name_in_contract
erpnext.patches.v15_0.drop_sle_indexes erpnext.patches.v15_0.drop_sle_indexes #2025-09-18
erpnext.patches.v15_0.update_pick_list_fields erpnext.patches.v15_0.update_pick_list_fields
erpnext.patches.v15_0.update_pegged_currencies erpnext.patches.v15_0.update_pegged_currencies
erpnext.patches.v15_0.set_company_on_pos_inv_merge_log erpnext.patches.v15_0.set_company_on_pos_inv_merge_log

View File

@@ -4,7 +4,7 @@ import frappe
def execute(): def execute():
table = "tabStock Ledger Entry" table = "tabStock Ledger Entry"
index_list = ["posting_datetime_creation_index", "item_warehouse"] index_list = ["posting_datetime_creation_index", "item_warehouse", "batch_no_item_code_warehouse_index"]
for index in index_list: for index in index_list:
if not frappe.db.has_index(table, index): if not frappe.db.has_index(table, index):

View File

@@ -347,5 +347,4 @@ class StockLedgerEntry(Document):
def on_doctype_update(): def on_doctype_update():
frappe.db.add_index("Stock Ledger Entry", ["voucher_no", "voucher_type"]) frappe.db.add_index("Stock Ledger Entry", ["voucher_no", "voucher_type"])
frappe.db.add_index("Stock Ledger Entry", ["batch_no", "item_code", "warehouse"])
frappe.db.add_index("Stock Ledger Entry", ["item_code", "warehouse", "posting_datetime", "creation"]) frappe.db.add_index("Stock Ledger Entry", ["item_code", "warehouse", "posting_datetime", "creation"])