DROP TABLE IF EXISTS `v_messages`;
DROP VIEW IF EXISTS `v_messages`;

CREATE OR REPLACE VIEW `_db_chat`.`v_messages` AS 
SELECT m_messages.*, _db_account.m_account.c_handle, _db_account.m_account.c_body_background_color, _db_account.m_account.c_profile_image
FROM m_messages
LEFT OUTER JOIN _db_account.m_account ON m_messages.id_account = _db_account.m_account.id_account;
