Added migration procedure that generate uids