This commit is contained in:
parent
13aca51f2d
commit
89a9cc26d3
|
@ -37,7 +37,8 @@ BEGIN
|
||||||
DELETE FROM saleTracking WHERE created < vOneYearAgo;
|
DELETE FROM saleTracking WHERE created < vOneYearAgo;
|
||||||
DELETE FROM ticketTracking WHERE created < v18Month;
|
DELETE FROM ticketTracking WHERE created < v18Month;
|
||||||
DELETE tobs FROM ticketObservation tobs
|
DELETE tobs FROM ticketObservation tobs
|
||||||
JOIN ticket t ON tobs.ticketFk = t.id WHERE t.shipped < TIMESTAMPADD(YEAR,-2,util.VN_CURDATE());
|
JOIN ticket t ON tobs.ticketFk = t.id
|
||||||
|
WHERE t.shipped < v5Years;
|
||||||
DELETE sc.* FROM saleCloned sc JOIN sale s ON s.id = sc.saleClonedFk JOIN ticket t ON t.id = s.ticketFk WHERE t.shipped < vOneYearAgo;
|
DELETE sc.* FROM saleCloned sc JOIN sale s ON s.id = sc.saleClonedFk JOIN ticket t ON t.id = s.ticketFk WHERE t.shipped < vOneYearAgo;
|
||||||
DELETE FROM sharingCart where ended < vDateShort;
|
DELETE FROM sharingCart where ended < vDateShort;
|
||||||
DELETE FROM sharingClient where ended < vDateShort;
|
DELETE FROM sharingClient where ended < vDateShort;
|
||||||
|
|
|
@ -25,11 +25,6 @@ proc: BEGIN
|
||||||
DELETE FROM Movimientos_mark WHERE odbc_date < vDate;
|
DELETE FROM Movimientos_mark WHERE odbc_date < vDate;
|
||||||
DELETE FROM Splits WHERE Fecha < vDate18;
|
DELETE FROM Splits WHERE Fecha < vDate18;
|
||||||
|
|
||||||
DELETE tobs
|
|
||||||
FROM ticket_observation tobs
|
|
||||||
JOIN Tickets t ON tobs.Id_Ticket = t.Id_Ticket
|
|
||||||
WHERE t.Fecha < vDate;
|
|
||||||
|
|
||||||
DELETE tobs
|
DELETE tobs
|
||||||
FROM movement_label tobs
|
FROM movement_label tobs
|
||||||
JOIN Movimientos m ON tobs.Id_Movimiento = m.Id_Movimiento
|
JOIN Movimientos m ON tobs.Id_Movimiento = m.Id_Movimiento
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
DELETE FROM vn.entryObservation
|
||||||
|
WHERE observationTypeFk IS NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.entryObservation
|
||||||
|
MODIFY COLUMN observationTypeFk tinyint(3) unsigned NOT NULL;
|
Loading…
Reference in New Issue