import jingrow
from jingrow.model.rename_pg import rename_pg


def execute():
	if jingrow.db.table_exists("Workflow Action") and not jingrow.db.table_exists("Workflow Action Master"):
		rename_pg("PageType", "Workflow Action", "Workflow Action Master")
		jingrow.reload_pg("workflow", "pagetype", "workflow_action_master")
