updated mongo script to add d1 retention for at least past 7 days