Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1060
commit.diff
Active
Public
Actions
Authored by
epriestley
on Feb 5 2014, 10:45 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F108793: commit.diff
Feb 5 2014, 10:45 PM
2014-02-05 22:45:50 (UTC+0)
Subscribers
None
diff --git a/resources/sql/patches/20130219.commitsummarymig.php b/resources/sql/patches/20130219.commitsummarymig.php
index a09534e..85ed6e3 100644
--- 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 @@ foreach ($commits as $commit) {
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";
Event Timeline
epriestley
edited the content of this paste.
(Show Details)
Feb 5 2014, 10:45 PM
2014-02-05 22:45:50 (UTC+0)
epriestley
changed the title of this paste from untitled to
commit.diff
.
epriestley
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment