[minor] replaced db_save by db_update and added patch to remove the indexes on tabBin
This commit is contained in:
16
erpnext/patches/v8_0/delete_bin_indexes.py
Normal file
16
erpnext/patches/v8_0/delete_bin_indexes.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2017, Frappe and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
# delete bin indexes
|
||||
unwanted_indexes = ["item_code", "warehouse"]
|
||||
|
||||
for k in unwanted_indexes:
|
||||
try:
|
||||
frappe.db.sql("drop index {0} on `tabBin`".format(k))
|
||||
except:
|
||||
pass
|
||||
Reference in New Issue
Block a user