salix/services/db/changes/1.0.0/03-address.sql

24 lines
817 B
MySQL
Raw Normal View History

2018-02-05 18:34:04 +00:00
CREATE OR REPLACE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`address` AS
SELECT
`t`.`id_consigna` AS `id`,
`t`.`Id_cliente` AS `clientFk`,
`t`.`domicilio` AS `street`,
`t`.`poblacion` AS `city`,
`t`.`codPostal` AS `postalCode`,
`t`.`province_id` AS `provinceFk`,
`t`.`telefono` AS `phone`,
`t`.`movil` AS `mobile`,
`t`.`consignatario` AS `nickname`,
`t`.`predeterminada` AS `isDefaultAddress`,
`t`.`longitude` AS `longitude`,
`t`.`latitude` AS `latitude`,
`t`.`warehouse_id` AS `warehouseFk`,
`t`.`Id_Agencia` AS `agencyFk`,
`t`.`isEqualizated` AS `isEqualizated`,
`t`.`active` AS `isActive`
FROM
`vn2008`.`Consignatarios` `t`