DROP TABLE IF EXISTS `v_homepage`;
DROP VIEW IF EXISTS `v_homepage`;

CREATE OR REPLACE VIEW `_db_index`.`v_homepage` AS 
SELECT m_homepage.id_homepage, m_homepage.id_account, m_homepage.id_category, m_category.c_categoryName, m_category.c_categoryDisplayColumn, m_category.c_categoryDisplayOrder, m_category.c_categoryDisplayColor, m_homepage.c_title, m_homepage.c_url, m_homepage.c_displayOrder, m_homepage.c_delete, m_homepage.c_privacy, m_homepage.c_html
FROM m_homepage
LEFT OUTER JOIN m_category ON m_homepage.id_category = m_category.id_category
WHERE m_homepage.c_delete = 0;
