[fix] modify the patch (#5680)

This commit is contained in:
Manas Solanki 2018-06-13 15:28:11 +05:30 committed by GitHub
parent 9e402ec3b5
commit 46b2afe434
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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')