DROP TABLE IF EXISTS `v_gpslog`;
DROP VIEW IF EXISTS `v_gpslog`;

CREATE OR REPLACE VIEW `_mydb_gpslog`.`v_gpslog` AS 
SELECT m_gpslog.*, m_category.c_categoryName, m_category.c_categoryDisplayColor, m_category.c_categoryDisplayOrder
FROM m_gpslog
LEFT OUTER JOIN m_category ON m_gpslog.id_category = m_category.id_category
WHERE m_gpslog.c_delete = 0;


DROP TABLE IF EXISTS `m_holiday`;
DROP VIEW IF EXISTS `m_holiday`;

CREATE OR REPLACE VIEW `_mydb_gpslog`.`m_holiday` AS 
SELECT _mydb_calendar.m_holiday.*
FROM _mydb_calendar.m_holiday;
