# Copyright (c) 2021, JINGROW
# For license information, please see license.txt


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "cluster")
	cluster = jingrow.get_pg({"pagetype": "Cluster", "name": "Default", "default": True})
	cluster.insert()
	pagetypes = ["Server", "Proxy Server", "Database Server", "Bench", "Site"]
	for pagetype in pagetypes:
		jingrow.reload_pg("jcloud", "pagetype", jingrow.scrub(pagetype))
		jingrow.db.set_value(pagetype, {"name": ("like", "%")}, "cluster", "Default")
