# -*- coding: utf-8 -*-
# Copyright (c) 2021, JINGROW
# For license information, please see license.txt


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "app_release")
	jingrow.db.sql(
		"""
		UPDATE `tabApp Release` as `release`
		INNER JOIN `tabApp Source` as source
		ON `release`.source = `source`.name
		SET `release`.public = `source`.public
	"""
	)
