mostly working migration script, some changes to social