save uid when migrating