Improved process to historize tables