import xhiveframework


def execute():
	xhiveframework.reload_doctype("Employee")
	xhiveframework.db.sql("update tabEmployee set first_name = employee_name")

	# update holiday list
	xhiveframework.reload_doctype("Holiday List")
	for holiday_list in xhiveframework.get_all("Holiday List"):
		holiday_list = xhiveframework.get_doc("Holiday List", holiday_list.name)
		holiday_list.db_set("total_holidays", len(holiday_list.holidays), update_modified=False)
