import jingrow
from jingrow.model.utils.rename_field import rename_field


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

	jingrow.reload_pg("desk", "pagetype", "dashboard_chart")

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