chunk table migration code (yet untested)