import influxframework
from influxframework.model.rename_doc import rename_doc


def execute():
	if influxframework.db.exists("DocType", "Client Script"):
		return

	influxframework.flags.ignore_route_conflict_validation = True
	rename_doc("DocType", "Custom Script", "Client Script")
	influxframework.flags.ignore_route_conflict_validation = False

	influxframework.reload_doctype("Client Script", force=True)
