diff --git a/frappe/patches.txt b/frappe/patches.txt index 2491adfd36..bcbb238ab7 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -215,5 +215,5 @@ frappe.patches.v10_0.increase_single_table_column_length frappe.patches.v11_0.create_contact_for_user frappe.patches.v11_0.sync_stripe_settings_before_migrate frappe.patches.v11_0.update_list_user_settings -frappe.patches.v11_0.rename_workflow_action_to_workflow_action_master +frappe.patches.v11_0.rename_workflow_action_to_workflow_action_master #13-06-2018 frappe.patches.v11_0.rename_email_alert_to_notification diff --git a/frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py b/frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py index 48990a3e3a..3502f57ef3 100644 --- a/frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py +++ b/frappe/patches/v11_0/rename_workflow_action_to_workflow_action_master.py @@ -1,5 +1,6 @@ import frappe def execute(): - if not frappe.db.table_exists("Workflow Action Master"): - frappe.db.sql("RENAME TABLE `tabWorkflow Action` to `tabWorkflow Action Master`") + if frappe.db.table_exists("Workflow Action") and not frappe.db.table_exists("Workflow Action Master"): + rename_doc('DocType', 'Workflow Action', 'Workflow Action Master') + frappe.reload_doc('workflow', 'doctype', 'workflow_action_master')