parent
31b07b31a9
commit
b712b65d76
|
@ -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 ;
|
|
@ -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`;
|
|
@ -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;
|
|
@ -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__ 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__ COMMENT='refs #6372 @deprecated 2023-12-13;';
|
||||
|
||||
|
|
Loading…
Reference in New Issue