migrate index key type to long