import influxframework


def execute():
	if influxframework.db.exists("DocType", "Member"):
		influxframework.reload_doc("Non Profit", "doctype", "Member")

		if influxframework.db.has_column("Member", "subscription_activated"):
			influxframework.db.sql(
				'UPDATE `tabMember` SET subscription_status = "Active" WHERE subscription_activated = 1'
			)
			influxframework.db.sql_ddl("ALTER table `tabMember` DROP COLUMN subscription_activated")
