import jingrow
from jingrow.model.rename_pg import rename_pg


def execute():
	if jingrow.db.exists("PageType", "Client Script"):
		return

	jingrow.flags.ignore_route_conflict_validation = True
	rename_pg("PageType", "Custom Script", "Client Script")
	jingrow.flags.ignore_route_conflict_validation = False

	jingrow.reload_pagetype("Client Script", force=True)
