Add triggers in the database for automatic alert generation