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


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "site_backup")
	jingrow.db.sql(
		"""
		UPDATE `tabSite Backup`
		SET `database_file` = `database`, `database_url` = `url`, `database_size` = `size`
		WHERE `database` IS NOT NULL
	"""
	)
