refactor: refs #7207 tab
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-09-24 15:49:45 +02:00
parent 02e837ebb6
commit 16b059a14a
1 changed files with 7 additions and 3 deletions

View File

@ -20,12 +20,16 @@ BEGIN
WHERE b.id = vBusinessFk;
IF vNewQueue IS NULL THEN
DELETE FROM pbx.queueMember WHERE extension = vExtension COLLATE utf8_general_ci;
DELETE FROM pbx.queueMember
WHERE extension = vExtension COLLATE utf8_general_ci;
ELSE
IF vPrevQueue IS NULL THEN
INSERT INTO pbx.queueMember (queue, extension) VALUES (vNewQueue, vExtension);
INSERT INTO pbx.queueMember (queue, extension)
VALUES (vNewQueue, vExtension);
ELSE
UPDATE pbx.queueMember SET queue = vNewQueue WHERE extension = vExtension COLLATE utf8_general_ci;
UPDATE pbx.queueMember
SET queue = vNewQueue
WHERE extension = vExtension COLLATE utf8_general_ci;
END IF;
END IF;
END$$