Add pre and insert and update hooks for timestamps