DROP PROCEDURE IF EXISTS mocha_truncate_tenant;

CREATE PROCEDURE mocha_truncate_tenant
(
	IN p_tenant_id INT
)
BEGIN

	DELETE FROM mocha_instances WHERE tenant_id = p_tenant_id;
	DELETE FROM mocha_attributes WHERE tenant_id = p_tenant_id;
	DELETE FROM mocha_relationships WHERE tenant_id = p_tenant_id;

END;
