added trigger check_dates to database, the signal is checked by the program