import influxframework
from influxframework.model.utils.rename_field import rename_field


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

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

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