diff --git a/db/changes/10110-postCampaign/00-ticketRequest.sql b/db/changes/10110-postCampaign/00-ticketRequest.sql index 6974df5cd..0b8a5d22d 100644 --- a/db/changes/10110-postCampaign/00-ticketRequest.sql +++ b/db/changes/10110-postCampaign/00-ticketRequest.sql @@ -83,4 +83,26 @@ BEGIN SET NEW.attenderFk = (SELECT w.id FROM worker w WHERE w.code = NEW.buyerCode); END IF; END$$ -DELIMITER ; \ No newline at end of file +DELIMITER ; + +USE `vn`; +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`ticketRequest__` AS + SELECT + `t`.`Id_ORDEN` AS `id`, + `t`.`ORDEN` AS `description`, + `t`.`requesterFk` AS `requesterFk`, + `t`.`attenderFk` AS `attenderFk`, + `t`.`CANTIDAD` AS `quantity`, + `t`.`Id_ARTICLE` AS `itemFk`, + `t`.`PRECIOMAX` AS `price`, + `t`.`isOk` AS `isOk`, + `t`.`Id_Movimiento` AS `saleFk`, + `t`.`ticketFk` AS `ticketFk`, + `t`.`COMENTARIO` AS `response`, + `t`.`odbc_date` AS `created` + FROM + `vn2008`.`Ordenes` `t`;