Osmocom's Base Station Controller for 2G mobile networks https://osmocom.org/projects/osmobsc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
osmo-bsc/contrib/hlr-remove-old.sql

18 lines
621 B

-- Remove old data from the database
DELETE FROM Subscriber
WHERE id != 1 AND datetime('now', '-10 days') > updated AND authorized != 1;
DELETE FROM Equipment
WHERE datetime('now', '-10 days') > updated;
DELETE FROM EquipmentWatch
WHERE datetime('now', '-10 days') > updated;
DELETE FROM SMS
WHERE datetime('now', '-10 days') > created;
DELETE FROM VLR
WHERE datetime('now', '-10 days') > updated;
DELETE FROM ApduBlobs
WHERE datetime('now', '-10 days') > created;
DELETE FROM Counters
WHERE datetime('now', '-10 days') > timestamp;
DELETE FROM RateCounters
WHERE datetime('now', '-10 days') > timestamp;
VACUUM;