REFS #6275 feat:Silex_to_Salix
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Sergio De la torre 2023-12-07 10:37:06 +01:00
parent 3692021b12
commit 61ed53bd1d
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeInsert
FOR EACH ROW
BEGIN
IF (NEW.ticketFk IS NOT NULL)
IF (NEW.longitude IS NOT NULL AND NEW.latitude IS NOT NULL AND NEW.ticketFK IS NOT NULL)
THEN
UPDATE address
SET longitude = NEW.longitude,
@ -26,7 +26,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`delivery_beforeUpdate
FOR EACH ROW
BEGIN
IF (NEW.longitude <> OLD.longitude OR NEW.latitude <> OLD.latitude OR NEW.ticketFk <> OLD.ticketFk)
IF (NEW.longitude IS NOT NULL AND NEW.latitude IS NOT NULL AND NEW.ticketFK IS NOT NULL)
THEN
UPDATE address
SET longitude = NEW.longitude,