From dd87e0f1e2b6ad0a69310f70f34c7b17f96dcb8b Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Wed, 10 Oct 2018 14:48:49 +0530 Subject: [PATCH] fix(leave-type): Drop column max_days_allowed (#15642) --- erpnext/patches.txt | 1 + erpnext/patches/v11_0/drop_column_max_days_allowed.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 erpnext/patches/v11_0/drop_column_max_days_allowed.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e45ab21bd46..f453fdad4f5 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -568,4 +568,5 @@ erpnext.patches.v11_0.remove_land_unit_icon erpnext.patches.v11_0.add_default_dispatch_notification_template erpnext.patches.v11_0.add_market_segments erpnext.patches.v11_0.add_sales_stages +erpnext.patches.v11_0.drop_column_max_days_allowed erpnext.patches.v11_0.change_healthcare_desktop_icons diff --git a/erpnext/patches/v11_0/drop_column_max_days_allowed.py b/erpnext/patches/v11_0/drop_column_max_days_allowed.py new file mode 100644 index 00000000000..f663674d1ed --- /dev/null +++ b/erpnext/patches/v11_0/drop_column_max_days_allowed.py @@ -0,0 +1,6 @@ +import frappe + +def execute(): + if frappe.db.exists("DocType", "Leave Type"): + if 'max_days_allowed' in frappe.db.get_table_columns("Leave Type"): + frappe.db.sql("alter table `tabLeave Type` drop column max_days_allowed") \ No newline at end of file