establishConnection('w'); $revisions = id(new DifferentialRevision())->loadAll(); echo "Migrating ".count($revisions)." revisions"; foreach ($revisions as $revision) { echo "."; $diff = $revision->loadActiveDiff(); if (!$diff) { continue; } $branch_name = $diff->getBranch(); $arc_project_phid = $diff->getArcanistProjectPHID(); queryfx( $conn_w, 'UPDATE %T SET branchName = %s, arcanistProjectPHID = %s WHERE id = %d', $table->getTableName(), $branch_name, $arc_project_phid, $revision->getID()); } echo "\nDone.\n";