Page MenuHomePhabricator

D8152.id18441.diff
No OneTemporary

D8152.id18441.diff

diff --git a/resources/sql/patches/20130219.commitsummarymig.php b/resources/sql/patches/20130219.commitsummarymig.php
--- a/resources/sql/patches/20130219.commitsummarymig.php
+++ b/resources/sql/patches/20130219.commitsummarymig.php
@@ -2,7 +2,9 @@
echo "Backfilling commit summaries...\n";
-$commits = new LiskMigrationIterator(new PhabricatorRepositoryCommit());
+$table = new PhabricatorRepositoryCommit();
+$conn_w = $table->establishConnection('w');
+$commits = new LiskMigrationIterator($table);
foreach ($commits as $commit) {
echo 'Filling Commit #'.$commit->getID()."\n";
@@ -18,8 +20,12 @@
continue;
}
- $commit->setSummary($data->getSummary());
- $commit->save();
+ queryfx(
+ $conn_w,
+ 'UPDATE %T SET summary = %s WHERE id = %d',
+ $commit->getTableName(),
+ $data->getSummary(),
+ $commit->getID());
}
echo "Done.\n";

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 9:49 AM (14 h, 19 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6913507
Default Alt Text
D8152.id18441.diff (878 B)

Event Timeline