fix problem with es mappings not being stored correctly

Hi,
I noticed that some of the mappings were not being migrated correctly

Tom