refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
David Domenech 2024-02-12 07:44:40 +01:00
parent 31b07b31a9
commit b712b65d76
4 changed files with 24 additions and 3 deletions

View File

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

View File

@ -0,0 +1,10 @@
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

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

View File

@ -136,9 +136,6 @@ ALTER TABLE IF EXISTS vn2008.tipsa__ COMMENT='refs #6372 @deprecated 2023-12-13;
ALTER TABLE IF EXISTS vn2008.payroll_basess RENAME vn2008.payroll_basess__; ALTER TABLE IF EXISTS vn2008.payroll_basess RENAME vn2008.payroll_basess__;
ALTER TABLE IF EXISTS vn2008.payroll_basess__ COMMENT='refs #6372 @deprecated 2023-12-13;'; ALTER TABLE IF EXISTS vn2008.payroll_basess__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.movement_label RENAME vn2008.movement_label__;
ALTER TABLE IF EXISTS vn2008.movement_label__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.pago_sdc RENAME vn2008.pago_sdc__; ALTER TABLE IF EXISTS vn2008.pago_sdc RENAME vn2008.pago_sdc__;
ALTER TABLE IF EXISTS vn2008.pago_sdc__ COMMENT='refs #6372 @deprecated 2023-12-13;'; ALTER TABLE IF EXISTS vn2008.pago_sdc__ COMMENT='refs #6372 @deprecated 2023-12-13;';