#!/bin/sh
/usr/bin/docker exec biuro-staging-mysql mysql -ustaging_user -p'qzl8pMNV^gZ&c1!7ebVsXqQh' --default-character-set=utf8 -e "
use staging_biuro;

DELETE FROM wp_biuro_employees WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_2_biuro_employees WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_3_biuro_employees WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_biuro_employers WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_2_biuro_employers WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_3_biuro_employers WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_biuro_recommend WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_2_biuro_recommend WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);

DELETE FROM wp_3_biuro_recommend WHERE created < DATE_SUB(now(), INTERVAL 4 DAY);
";
