Hi folks, Im getting myself in a mess trying to trim my database down from abandoned bases.
What Ive done so far:
All bases are indestructable. I want to keep this the case.
On the 18th, I ran a script to update all objects 'last updated' time to be the 18th.
I edited my init.sqf to have maintain when damage is 0
I editied fn_selfactions to make maintenance free
Ive pre warned all players that they must maintain thier bases every 7 days starting from the 21st.
What I want to acheive.. I thought I had saved an sql event in my bookmarks that would delete all objects that havent been updated in the previous 7 days, however I cant find it.
I found this one
DROP EVENT IF EXISTS `removeObjectOld`; |
DELIMITER ;; |
CREATE EVENT `removeObjectOld` ON SCHEDULE EVERY 1 DAY COMMENT 'Removes old objects and vehicles' DO DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY) |
;; |
DELIMITER ; |
But I tried it on my test server and it didnt delete anything. I changed the interval 24 day and interval 42 day to 1 day to try and it still didnt delete anything. SQL isnt my forte and I dont know what Im doing wrong.
I just want a scipt I can run that deletes anything that hasnt been updated in the previous 7 days, be it automatic or one I have to run manually.. I have navicat or phpmyadmin acsess to the database and seemingly can create events without any issues, as I have run a charcter data one without issues, I just dont know what the correct event is for this purpose!