refs #6372
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
David Domenech 2024-02-21 14:07:52 +01:00
parent 1cf17a3d8d
commit 5bef3989cd
4 changed files with 9 additions and 15 deletions

View File

@ -1,6 +1,6 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`movementLabel_afterUpdate`
AFTER UPDATE ON `vn`.`movementLabel`
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate`
AFTER UPDATE ON `vn`.`saleLabel`
FOR EACH ROW
IF NEW.stem >= (SELECT s.quantity FROM sale s WHERE s.id = NEW.saleFk) THEN
UPDATE sale s SET s.isPicked = TRUE WHERE s.id = NEW.saleFk;

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`movement_label`
AS SELECT
`m`.`saleFk` AS `Id_movimiento`,
`m`.`label`,
`m`.`stem`,
`m`.`created`
FROM
`vn`.`movementLabel` `m`;

View File

@ -1,6 +1,8 @@
DROP TRIGGER IF EXISTS `vn2008`.`movement_label_afterUpdate`;
ALTER TABLE IF EXISTS `vn2008`.`movement_label` RENAME `vn`.`movementLabel`;
DROP VIEW IF EXISTS `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn`.`movementLabel`
ALTER TABLE IF EXISTS `vn2008`.`movement_label` RENAME `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn`.`saleLabel`
CHANGE COLUMN IF EXISTS `Id_movimiento` `saleFk` int(11) NOT NULL;

View File

@ -2,4 +2,6 @@ ALTER TABLE IF EXISTS `vn2008`.`warehouse_pickup` RENAME `vn`.`warehousePickup`;
ALTER TABLE IF EXISTS `vn`.`warehousePickup`
CHANGE COLUMN IF EXISTS `warehouse_id` `warehouseFk` smallint(5) unsigned NOT NULL,
CHANGE COLUMN IF EXISTS `agency_id` `agencyModeFk` int(11) DEFAULT NULL;
CHANGE COLUMN IF EXISTS `agency_id` `agencyModeFk` int(11) DEFAULT NULL;
ALTER TABLE `vn`.`warehousePickup` COMMENT='Agencia de recogida para cada almacén';