import xhiveframework


def execute():
	doctype = "Top Bar Item"
	if not xhiveframework.db.table_exists(doctype) or not xhiveframework.db.has_column(doctype, "target"):
		return

	xhiveframework.reload_doc("website", "doctype", "top_bar_item")
	xhiveframework.db.set_value(doctype, {"target": 'target = "_blank"'}, "open_in_new_tab", 1)
