-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Drop
name
part from posting sort index (#33551)
(cherry picked from commit 8a56df6) # Conflicts: # erpnext/patches.txt
- Loading branch information
1 parent
914e2fd
commit f501575
Showing
3 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import frappe | ||
|
||
from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import on_doctype_update | ||
|
||
|
||
def execute(): | ||
try: | ||
frappe.db.sql_ddl("ALTER TABLE `tabStock Ledger Entry` DROP INDEX `posting_sort_index`") | ||
except Exception: | ||
frappe.log_error("Failed to drop index") | ||
return | ||
|
||
# Recreate indexes | ||
on_doctype_update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters