1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
phorge-phorge/resources/sql/patches/20130219.commitsummarymig.php
vrana 8fcf4d5ac3 Use relatives in commit summary migration
Test Plan: Ran it on test DB.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5061
2013-02-21 16:26:14 -08:00

25 lines
477 B
PHP

<?php
echo "Backfilling commit summaries...\n";
$commits = new LiskMigrationIterator(new PhabricatorRepositoryCommit());
foreach ($commits as $commit) {
echo 'Filling Commit #'.$commit->getID()."\n";
if (strlen($commit->getSummary())) {
continue;
}
$data = $commit->loadOneRelative(
new PhabricatorRepositoryCommitData(),
'commitID');
if (!$data) {
continue;
}
$commit->setSummary($data->getSummary());
$commit->save();
}
echo "Done.\n";