8179-testToMaster #3176
|
@ -23,9 +23,14 @@ BEGIN
|
||||||
DELETE FROM messageInbox WHERE sendDate < v2Months;
|
DELETE FROM messageInbox WHERE sendDate < v2Months;
|
||||||
DELETE FROM messageInbox WHERE sendDate < v2Months;
|
DELETE FROM messageInbox WHERE sendDate < v2Months;
|
||||||
DELETE FROM workerTimeControl WHERE timed < v4Years;
|
DELETE FROM workerTimeControl WHERE timed < v4Years;
|
||||||
SET @canDeleteItemShelvingSale = TRUE;
|
DELETE FROM itemShelvingSale
|
||||||
|
WHERE itemShelvingFk IN (
|
||||||
|
SELECT id
|
||||||
|
FROM itemShelving
|
||||||
|
WHERE created < util.VN_CURDATE()
|
||||||
|
AND visible = 0
|
||||||
|
);
|
||||||
DELETE FROM itemShelving WHERE created < util.VN_CURDATE() AND visible = 0;
|
DELETE FROM itemShelving WHERE created < util.VN_CURDATE() AND visible = 0;
|
||||||
SET @canDeleteItemShelvingSale = NULL;
|
|
||||||
DELETE FROM ticketDown WHERE created < util.yesterday();
|
DELETE FROM ticketDown WHERE created < util.yesterday();
|
||||||
DELETE IGNORE FROM expedition WHERE created < v26Months;
|
DELETE IGNORE FROM expedition WHERE created < v26Months;
|
||||||
DELETE cs
|
DELETE cs
|
||||||
|
|
|
@ -9,9 +9,7 @@ BEGIN
|
||||||
FROM itemShelvingSale
|
FROM itemShelvingSale
|
||||||
WHERE itemShelvingFk = OLD.id;
|
WHERE itemShelvingFk = OLD.id;
|
||||||
|
|
||||||
IF vItemShelvingSaleExists AND (NOT @canDeleteItemShelvingSale
|
IF vItemShelvingSaleExists THEN
|
||||||
OR @canDeleteItemShelvingSale IS NULL) THEN
|
|
||||||
|
|
||||||
CALL util.throw('Cannot delete item shelving with item shelving sale');
|
CALL util.throw('Cannot delete item shelving with item shelving sale');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue