CREATE OR REPLACE
    ALGORITHM = UNDEFINED 
    DEFINER = `root`@`%` 
    SQL SECURITY DEFINER
VIEW `vn`.`agencyHour` AS
    SELECT 
        `h`.`agency_hour_id` AS `id`,
        `h`.`agency_id` AS `agencyFk`,
        `h`.`agency_id` AS `__agency`,
        `h`.`week_day` AS `weekDay`,
        `h`.`warehouse_id` AS `warehouseFk`,
        `h`.`warehouse_id` AS `__warehouse`,
        `h`.`province_id` AS `provinceFk`,
        `h`.`province_id` AS `__province`,
        `h`.`subtract_day` AS `substractDay`,
        `h`.`max_hour` AS `maxHour`
    FROM
        `vn2008`.`agency_hour` `h`