fix(patch): Drop DI Legacy if exists

- Ignore patch if already run
This commit is contained in:
Faris Ansari 2020-06-24 13:36:15 +05:30
parent bbdc5e0db8
commit 711f8231bc
2 changed files with 5 additions and 1 deletions

View file

@ -289,4 +289,4 @@ execute:frappe.delete_doc("DocType", "Onboarding Slide Field")
execute:frappe.delete_doc("DocType", "Onboarding Slide Help Link")
frappe.patches.v13_0.update_date_filters_in_user_settings
frappe.patches.v13_0.update_duration_options
frappe.patches.v13_0.replace_old_data_import
frappe.patches.v13_0.replace_old_data_import # 2020-06-24

View file

@ -6,6 +6,10 @@ import frappe
def execute():
if not frappe.db.exists("DocType", "Data Import Beta"):
return
frappe.db.sql("DROP TABLE IF EXISTS `tabData Import Legacy`")
frappe.rename_doc('DocType', 'Data Import', 'Data Import Legacy')
frappe.db.commit()
frappe.db.sql("DROP TABLE IF EXISTS `tabData Import`")