changed local db env and fixed profile migration