import xhiveframework
from xhiveframework.model.rename_doc import rename_doc


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

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

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