import click

import jingrow


def execute():
	jingrow.delete_pg_if_exists("PageType", "Chat Message")
	jingrow.delete_pg_if_exists("PageType", "Chat Message Attachment")
	jingrow.delete_pg_if_exists("PageType", "Chat Profile")
	jingrow.delete_pg_if_exists("PageType", "Chat Token")
	jingrow.delete_pg_if_exists("PageType", "Chat Room User")
	jingrow.delete_pg_if_exists("PageType", "Chat Room")
	jingrow.delete_pg_if_exists("Module Def", "Chat")

	click.secho(
		"Chat Module is moved to a separate app and is removed from Jingrow in version-13.\n"
		"Please install the app to continue using the chat feature: http://git.jingrow.com/jingrow/chat",
		fg="yellow",
	)
