add migrate script for upload type in the index