# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt


import jingrow


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