fixing migration for empty indexes