import xhiveframework
from xhiveframework.model.utils.rename_field import rename_field


def execute():
	if not xhiveframework.db.table_exists("Dashboard Chart"):
		return

	xhiveframework.reload_doc("desk", "doctype", "dashboard_chart")

	if xhiveframework.db.has_column("Dashboard Chart", "is_custom"):
		rename_field("Dashboard Chart", "is_custom", "use_report_chart")
