I think this might need to be above the section where you "stringify_dates".  The reports table is going to expect timestamps to still be in the form of timestamps when it does its insert.  though PG may be clever enough to do convert on the fly.